3

I'm building an application, and need to support both 1.5 (Magic and Hero) and 1.6 (Tattoo) devices.
As Android SDK is forward compatible, it seemed logical to build against Android 1.5 SDK, and expect application to work on Tattoo.
While that's true, (I tested app, it works ok), I'm now having problems on Android Market.

On Tattoo, Market search by default filters android apps that doesn't have explicit support for small screens defined in AndroidManifest.

Problem is that attribute exists only on Android 1.6 SDK, so Building against Android 1.5 SDK is no an option anymore.

How safe is to build App agains A1.6 (with minSdkVersion="3") and run it on 1.5 devices?
Is there anything else I should take care of except just change target SDK?

bummi
  • 27,123
  • 14
  • 62
  • 101
Jox
  • 7,132
  • 14
  • 49
  • 63
  • Tip: set the Filter by API Level to 3 when browsing the SDK web pages, this will grey out anything that requires 1.6 or above. Makes it much easier to ensure you don't accidentally call something that will crash the app if it's running on a 1.5 device. – wf. Jan 21 '10 at 21:07

1 Answers1

4

Make sure you don't mix up minimum SDK version and target SDK version as these are different options.

For example, I use the following setting in the application for my manifest:

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

The documentation says the following about targetSdkVersion:

In some cases, this allows the application to use manifest elements or behaviors defined in the target API Level, rather than being restricted to using only those defined for the minimum API Level.

So by specifying targetSdkVersion of 4 but having a minimumSdkVersion of 3 you'll have an application which should work on 1.5 devices and 1.6 small screen devices.

David Webb
  • 190,537
  • 57
  • 313
  • 299