Make an App available on Android 1.5 and small screen

I have always published my simpler Android applications for all Android devices version 1.5 and higher.

I thought this would allow the application to run on the maximal number of devices.

Recently I bought a new Android phone for testing: Huawei U8180 X1 (branded as Orange Stockholm) with Android 2.2.2

To my surprise many of my simpler applications where filtered out on the Android market.
Why?

The explanation for this strange behavior is that the Huawei U8180 has a very small screen but Android 1.5 did not support small screen sizes.
Support for small screens was added with Android 1.6.

How can I make an application run on 1.5 but also on small screens?

The solution is simple:

  1. Switch your application to compile against Android 1.6
  2. Declare the minSdkVersion to be 3 (= Android 1.5)
  3. Declare the targetSdkVersion to be 4 (= Android 1.6)

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.simpleapp"
      android:versionCode="1"
      android:versionName="1.0">

    <uses-sdk
            android:minSdkVersion="3"
            android:targetSdkVersion="4"
    />

After uploading the APK file to the Android Market you see the following information:

API level: 3-14+
Supported screens: small-xlarge

My Huawei phone can now download the app without problema.

The API you are developing against is now Android 1.6, so you have to be careful to not use any API parts that did not yet exist in 1.5.
One trick to do this is to initially develop against 1.5 and switch only at the end to 1.6.

This entry was posted in Android and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *