Need device info? Here’s where to find it…

Posted by in How-to

You’ll often need detailed device info when developing mobile apps. Most likely info about the device’s programming platform and capabilities, which you’ll need at least twice during the development life cycle: firstly, while developing the app, and secondly during distribution/provisioning.

If you’re developing the app for one specific device, you’d probably be fairly certain of all this info, and are likely to have a test handset. In the real world, however, you seldom develop for a single device at a time. To create something more useful, you’ll want to target a wide range of devices on the same, or possibly different platforms and operating systems. To do this, you’ll want to create as many variants of the app as required, but no more. This is where the real art comes into it: how to maximize coverage, while minimizing development effort. But that’s a subject for another post. For now, I’ll focus on where to find the information you’ll need to make these plans.

The type of information you need goes from a high level (operating system and development platform) down to very specific capabilities, both hardware (e.g. screen size, input methods) and firmware (e.g. supported video/audio codecs). The version of the development platform can be critical, as subtle issues may arise if you use a more recent SDK to develop apps for devices running an older platform. This is particularly true for BlackBerry devices (see here). You’ll obviously also need to know which APIs are present on the target device(s).

The first source of info I recommend is DeviceAtlas. DeviceAtlas offers an extensive online database of devices, which you can browse very easily by signing up for a free developer ‘license’. They also encourage community involvement through a test mobi site for your device — the results are uploaded to the database automatically. To help avoid conflicting values in the database they indicate which of a device’s details may be questionable. Overall, this is an excellent source of information, which is easy to use. Check out their Data Explorer tool which constructs useful graphs that summarize device trends, such as common screen widths. BTW, DeviceAtlas’ sister site, mobiForge, is an outstanding resource if you’re starting out with mobile development, or moving on to a new platform. Here you’ll find well written articles on all aspects of mobile development.

But back to DeviceAtlas…it stores device info such as:

* Screen size and color depth
* Touchscreen support
* OS details
* Content supported by the phone’s browser
* Audio/Video codec support and streaming support
* DRM support
* Java ME MIDP and CLDC versions
* JSR support
* User Agent strings

This info will be invaluable if you want to develop applications of any complexity.

DeviceAtlas also offers APIs (PHP, Java, .Net) for querying their database, which are very handy when doing application provisioning (i.e., which app version do you deliver to the requesting device?). There are also ‘paid-for’ services, which allow you to host the data on your own servers and get regular updates. I recommend you visit the site to review current options and pricing.

The only trouble with DeviceAtlas is that it’s focus is slightly biased towards mobi site development rather than app development. This means some details will be missing, such as device key codes. This can be a problem, for example, when developing MIDlets that need key codes for soft keys (the other keys are handled in a generic way, thanks to the ‘game action’ abstraction).

If you require this, or other app related info, it’s a good idea to have a look at WURFL, a community driven device database. You can download the latest version of the device and capability database in the form of an XML file. This data can be hosted on your own server. WURFL also has APIs available for accessing the data in PHP, Java and soon .Net.

The device capabilities recorded by WURFL are too numerous to list, but include screen details, input methods, image, video and audio formats, browser markup support, and data for developers, such as key codes. As with everything, there are shortcomings. With WURFL it’s the fact that many fields for device capabilities are not populated with data, even for relatively popular devices. This limits it’s usefulness to some degree.

So you still can’t find what you’re looking for? Well, consider getting it straight from the horse’s mouth and join one of the manufacturer’s developer sites. A few popular ones are listed here:

* Nokia
* BlackBerry
* Samsung
* Sony-Ericsson
* Motorola

You’ll find technical articles galore on these sites, and may very well get the critical data you’re after. Nokia and BlackBerry are particularly good, with the others close behind. I’ll leave the iPhone out of this for the moment. :-)

Oh yes, and don’t neglect Wikipedia, it’s often the best source available.

There are several other resources that may be useful, but I’ll save those for another post. Until then, happy hunting!