How to deliver correct mobile content to a mobile device successfully?
Well, the first and most important thing to do is – correctly identify the mobile device of the user.
And the second thing would be to identify the MIME Type supported by the mobile device.
We can get the information about a device by looking at the “User Agent” of that mobile device. User Agent sometimes referred as “UAProfile” or “UAProf” contains some information about that particular mobile device. e.g. Have a look at the following user agent of a Nokia N95 device.
“Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN95/10.0.018; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413″
Now you can see some basic information in it like Symbian OS version is 9.2, device name is Nokia N95. You can also see the version of J2ME Profile (MIDP) and Configuration (CLDC) as well.
You can get the user agent from the request’s “user-agent” header.
Sting userAgent = request.getHeader(“user-agent”);
Unfortunately, we don’t have any standard available for user agent, so at times its hard to identify the device.
There are a number of device detection solutions available too. Following are some i know
Device Atlas http://www.deviceatlas.com/
Wurfl http://wurfl.sourceforge.net/
As far as identifing MIME Type is concerned i ll post that soon as well.
