UAProf device profiles

This post was written by Jeroen on January 27, 2009
Posted Under: UAProf

When you’re sending plain text SMS messages to a mobile device you don’t have to worry too much about whether the device can display it correctly. Plain text SMS messages are the lowest common denominator of mobile messaging.

When you want to send more complicated messages, like:

  • EMS messages
  • Pictures messages (or MMS messages)
  • Ringtones
  • Wallpapers

You’ll need to know more about the device you’re sending to. There are many possible formats and even when you know which format to use you’ll need to worry about sizes, capacity, supported characters sets and more.

This problem can be addressed in different ways.

The standards describe a User Agent Profile (or UAProf) file. A UAProf file is an XML file that enumerates many of the capabilities of the device. A device that has an UAProf file will send a link to to it in one of the HTTP headers when it requests information from a (mobile) web (or WAP) site. This however doesn’t help you if you want to send a multimedia message to a device you haven’t interacted with before.

Another way to address this problem is by leveraging WURFL. WURFL is a community maintained open-source database of device capabilities. It is contains a superset of the information supplied in UAProf files:

  • Not all devices send an UAProf link. For the devices that don’t, WURFL might still have an entry containing the information that would normally be passed in the UAProf file.
  • WURLF also contains more specific descriptions for certain features, for instance the UAProf file might might tell you the device support WML 1.3, but WURFL will help you understand how the device renders certain WML tags (e.g can the device display an image and text on the same line).

Of course WURLF doesn’t solve the basic problem that you’ll need to know what device you’re sending to. If all you have is a mobile phone number, then the only thing that is safe to send would be a simple SMS text message.

Reader Comments

There is another option. dotMobi, the company behind the .mobi domain name, makes an inexpensive crowdsourced device database. This database is a superset of both UAProf and WURFL. It includes direct feeds licensed from others such as handset manufacturers, mobile operators, and other companies with access to device information. It comes with a simple API which will both detect the device from its headers and will return to you the device capabilities. Called DeviceAtlas, it can be downloaded at no charge for developers. It can be found at http://www.deviceatlas.com.

#1 
Written By Paul Nerger on January 27th, 2009 @ 11:12 am

Yes, DeviceAtlas is another option, but unlike the WURFL and UAProf options it requires a non-free license for commercial applications.

#2 
Written By Jeroen on January 27th, 2009 @ 4:08 pm

here is another uaprof / user agent site with a detection mechanism: http://www.mobilemultimedia.be

#3 
Written By Klint on May 26th, 2009 @ 9:28 am

Hi,
I have published the last version of “Apache Mobile Filter”, this open source project has in the first 8 months, more than 1100 downloads from sourceforge and I suppose the same from CPAN.

The Apache Mobile Filter allows you to access WURFL from any programming language, not just Java and php that is traditionally used for dynamic mobile web sites.

The module detects the mobile device and passes the WURFL capabilities on to the other web application as environment variables. It can also be used to resize images on the fly to adapt to the screen size of the mobile device.
Try it and let me know your opinion.

For more info: http://www.idelfuschini.it/it/apache-mobile-filter-v2x.html

I have made two test pages:

PC Test Page: http://apachemobilefilter.nogoogle.it/php_test.php

Mobile Test Page: http://apachemobilefilter.nogoogle.it

#4 
Written By Idel on August 17th, 2009 @ 9:11 am

Add a Comment

required, use real name
required, will not be published
optional, your blog address