CodeIgniter Forums

Full Version: is_mobile()
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
The site I am working on will need to support mobile devices. Blackberry devices to be specific. I want to redirect my mobile users to a different template, but that isn't the problem.

The problem is the BlackBerry Browser Identification. When using is_mobile() and the browser Identification is set to "BlackBerry" it works as expected. But if I change it to Internet Explorer it does not identify the browser as a mobile device.

Does anyone have a work around for this? I know a user is going to change this setting and the mobile site is not going to function as expected.

I have also been messed around with the following:

agent->browser() returns "Internet Explorer"
agent->platform() returns go figure on this one "Windows XP"
agent->string() returns "Mozilla/4.0(compatible; MSIE 7.0; Windows NT 5.1; .net CLR 2.0.50727)"

any insight would be most helpful!

El Forum

[eluser]Eric Brown[/eluser]
You could look into WURFL or this http://detectmobilebrowsers.mobi/