If you have developed your Android application with the 1.5 SDK (or earlier), then your application won’t show up on the Android Market for users with devices with a lower screen resolution, like for instance the HTC Tattoo, HTC Wildfire, or Sony Ericsson X10 mini.
This is of course very unfortunate for both the user and you! The user won’t be able to use your wonderful application, and you’re missing out on an entire user base. This is a user base that is, growing and growing, since the smaller size devices are very popular among people that usually wouldn’t consider the larger smartphones.
But don’t despair, with just a couple of minor fixes you’ll be able support the smaller devices as well, since the Android OS, and the 1.6 version of the SDK handles most things for you.
Please note that nothing that I describe here affects your other users who use Android 1.5 and earlier. If you compile using the 1.6 SDK, users using Android 1.5 (and earlier) will still be able to use your application without any problems, and it will still show up on the Android market for them. It’s only if you use any API’s that was introduced in 1.6 that will require that users run Android 1.6 or newer.
What needs to be done?
Android 1.5 and earlier versions of the platform were designed to support a single screen configuration — HVGA (320×480) resolution on a 3.2″ screen. Because the platform targeted just one screen, you could write your application specifically for that screen, without needing to worry about how your application would be displayed on other screens. So by default Android Market hides all those 1.5 and earlier applications that hasn’t explicitly defined that they support lower resolution screens from devices such as the HTC Tattoo.
Starting from Android 1.6, the platform adds support for multiple screen sizes and resolutions (adding for instance QVGA 320×240 and WVGA 480×800). But usually not much needs to be done from what I’ve heard from other developers. This is due to that the Android platform handles most of the work of adapting your app to the current screen by running it in a compatibility mode. So you only need to make some changes to AndroidManifest.xml, recompile with the 1.6 SDK and you’re set to go.
Note! If your applications needs to, you can create screen-specific resources for precise control of your UI, but this is usually not needed.
Getting it to show on Android Market
First we need to change some things in the AndroidManifest.xml. Start by adding targetSdkVersion to uses-sdk. With this setting we are saying that we run against Android 1.6 (the value 4) the minimum requirement is Android 1.5 (the value 3).
<uses-sdk android:minSdkVersion=”3″ android:targetSdkVersion=”4″ />
This should be enough according to the SDK documentation, but I’ve heard from some developers that they also need to explicitly define the screen resolution settings.
<supports-screens android:largeScreens=”true” android:normalScreens=”true” android:smallScreens=”true” android:anyDensity=”true” />
After you made these changes, compiled your application with the 1.6 version of the Android SDK and published it to the Android market, it should be available for all your users. Here’s also a complete example of a manifest that supports the Tattoo.
More information
There’s a longer article in the Android developer documentation which describes how you work with different screen sizes, and you can find it here.
Testing
Before you post your application to the Android Market, please test your application with an emulator that is configured with the QVGA resolution to make sure that everything looks good. If you are uncertain if your application is now available on the market contact me and I’ll help you out with the testing or I’ll try to answer any questions that you have.
Why should you bother?
There is a bunch of reasons why you should do the little extra work of supporting lower screen resolutions.
- There are several more devices in the pipeline that uses the lower screen resolution.
- A lot of “ordinary” people (i.e. non tech geeks) prefer the smaller devices like the Tattoo, not only for the low introduction price, but also for the smaller size. When I show the Tattoo around, a lot more people gets interested in the smaller device, than they get when I show them a larger Smartphone. So sales in this segment will increase, as well as the user base.
- If you code properly it won’t be much work, and you will also have code that is much easier to port for those super cool larger displays.
- The good feeling of doing it right and being a kick ass developer that can code for all the devices
- It usually isn’t that much work, it could be just editing the manifest
Thanks to Johan Nilsson for sharing the information about the Tattoo manifest changes on the Swedroid forums. Without this as a springboard I don’t think that this article would have been written.
Many thanks for the information. I enjoyed reading it. You have a very well-done blog.
I think I need a smartphone with android 2.1, I think there is no use in buying a mobilephone with 1.5.
Great blog post. Very well written and clearly solved my problem!
Thanks, It was very useful! :)
Not a bad read tbh