Mobile device detection for rendering rich web content
Asked Answered
S

2

2
  1. What are the most web-capable mobile phones to date (models and / or user agents) and

  2. What rules should be assessed when trying to determine if they will handle a rich mobile-customised site?

I am developing a mobile website and currently doing some user agent detection to determine if the mobile device should see a fully enhanced js, jquery mobile, css view, or plain a fallback one.

Here is what I currently have for my two questions, and I would like some input / suggestions on how this can be improved - this filtering is assessed top-to-bottom:

Enhanced view if the user agent contains the following: "iPhone", "iPad", "Android 3", "Android 2", "MSIE 9", "MSIE 8", "MSIE 7", "Windows Phone OS 7", "IEMobile/7", "BlackBerry99", "BlackBerry 9800", "BlackBerry Tablet"

then Fallback view if the user agent contains the following: "Android 1", "MSIE 6", "MSIE 5", "MSIE 4", "MSIE 3", then there are a whole bunch of old blackberry UAs i.e. "BlackBerry8" and older Opera Mini versions i.e. "Opera Mini/3"...

then Enhanced view if found to be a web browser (also helpful for testing reasons). This is again determined by user agent rules.

then Fallback view when the user agent is loaded (and found) in the WURFL API and the release date is found to be too old. At the moment I am considering this to be prior to 2007.

then Fallback view when the WURFL device_os capability shows 'Windows Mobile OS' with device_os_version capability '5', or '6'.

then Enhanced view as could not determine what they are using, so give the best experience (this will cater for new release handsets)

The way this is set up, it is better to find reasons to exclude a device than to include one, as the last condition will return the enhanced view.

Salem answered 20/5, 2011 at 2:23 Comment(0)
C
2

What are the most web-capable mobile phones to date (models and / or user agents)

I think you've already identified the most important ones: iOS devices, Android 2.0+, and recent BlackBerry devices. But really, if you want to know how well your site is supported, you should check out the emulators/simulators available for particular devices.

An excellent list of example User-Agent strings can be found here.

What rules should be assessed when trying to determine if they will handle a rich mobile customised site?

BlackBerry devices running OS 6.0 or higher will have a WebKit-based browser which supports the latest goodies, so you could improve your filtering for BlackBerry devices to anticipate new/unreleased devices that will work well. The following User-Agent example shows that the device is running OS 6.0.0.141:

Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, Like Gecko) Version/6.0.0.141 Mobile Safari/534.1+

Prior to OS 6.0, the BlackBerry User-Agent looked a bit different (and the web browser experience was much worse). The following User-Agent example shows that the device is running OS 4.7.1.40:

BlackBerry9630/4.7.1.40 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/105
Canner answered 20/5, 2011 at 4:6 Comment(4)
Thanks, all good info. I have been looking through the zytrax list and also the wurfl xml file for user agent examples. Do you have similar kinds of info about Nokia or other mainstream brands I have not listed? I'm not sure if any nokias are capable enough or where to draw the line with them...Salem
Sorry, I don't know much about Nokia devices. I'm inclined to believe that none of those phones would give users a good experience... You've probably already seen this, but just in case you haven't, I did notice a few good ratings for the native Symbian browser on jQuery Mobile's site: [jquerymobile.com/gbs/]Canner
Looks like the newer ones (n8, c7, e7) include "Symbian/3" and the older ones (n97, c6) have "SymbianOS"Salem
Oh, and "SeriesS60/5" for Symbian S60 version 5.0+Salem
M
0

If the device supports preferred_markup = html_web_4_0

From WUFL

Misbehavior answered 1/6, 2011 at 4:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.