tags:

views:

72

answers:

1

Hi

I developed one simple android application targeting the Mobiles with android 2.0 OS.I want to know whether i can run the same application in android 1.5 .If any body knows it please help me out.

+2  A: 

In your AndroidManifest.xml file (located in the base of the project) there's a tag called uses-sdk

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

Those numbers are known as API level where 3 is for Android 1.5 and 5 is for Android 2.0.

http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

Note that this allows you to compile your code against the 2.0 SDK but if you use classes or functionality in your app that is not supported in 1.5 then it will crash. I recommend that you create an AVD for 1.5 and 1.6 for testing.

You may want to consider just compiling against 1.5 for simplicty.

Lastly, a common trick is to compile against 2.0 and avoid/disable features that aren't supported in earlier versions of android the following article shows how do this.

http://developer.android.com/resources/articles/backward-compatibility.html

Jeremy Edwards
Lastly, you'll want to use the lowest API version that will support your app so that you can target the largest audience. Here's a graph showing the spread of android installs based on market activity. http://developer.android.com/resources/dashboard/platform-versions.html
Jeremy Edwards
Thanks for your timely reply.The Simple application that i have created is a Bluetooth application.Only Android 2.0 Version contains the Bluetooth api.So i created the application in android 2.0.But now my target device is Android 1.5 .Is it possible to run that application in android 1.5.because android 1.5 version also contains the bluetooth capability.
Rajapandian
No you can't, because 1.5 does not have the APIs you are using.
Romain Guy