Sunday, May 1, 2011

How mobile platforms identify mobile devices

This is the most fundamental question is for anyone who is developing a mobile rendering platform.Lets have a look at the available options.I am getting some examples and try to identify how WordPress plugins and Joomla Templates try to achieve the goal.


I found two popular plugins for WordPress which can identify the device and render the mobile theme accordingly.Mobile Press and Wp-Mobile-Detector are similar in identifying the device and they use a pre defined set of possible values to detect a match in request. (Eg: check possible user agent in request.)Joomla templates also using a similar method by matching the possible values using regular expressions for  HTTP_USER_AGENT.
The most interesting and extensible method i found was to use WURLF .As in the project home page it is "The WURFL is an XML configuration file which contains information about capabilities and features of many mobile devices".They are offering a good API for JAVA as well as PHP and i think using WURLF will be more appropriate as it is being updated by the user base more frequently to identify more mobile platforms in the mobile world.


Update. (2011 May 19)
In my Project i will not be using wurlf.

  • WURLF is under GPL and not compatible with Apache licence.
  • At the moment we do not want to know the device capabilities.

No comments:

Post a Comment