0

I am learning the Android SDK and I am getting to the point of getting a bit more comfortable to start doing actual app development. I have done some reading here and there online, and based on my limited understanding, I as a developer, should include the Android API levels that I intend to make the app available to. My question is related to this...

Based on some charts online, it seems to make the most sense to support devices from 2.3 (Gingerbread) all the way to the current KitKat API. So that would mean API level 10 - current.

Question 1 Do I have to download all the API levels in between (i.e. 3.0, 4.0, 4.1, etc...)or is the lowest and highest be enough?

Question 2 If I do not end up downloading those API levels in between? What would a user running, say 4.0), experience? Would they be totally unable to run the app? Or would it simply mean that I, as a developer, would not be able to use any of the APIs states in those levels?

I understand that there might be some compatibility issues, from changes in the API which I would need to work out myself.

Thanks you for your clarification.

Gil
  • 1
  • 1
  • related http://stackoverflow.com/questions/8629687/android-api-level-vs-android-version?rq=1 –  Jan 10 '14 at 22:07

3 Answers3

1

You just have to download the latest API. You can define in your app what the minimum Android version can run it (you should start low but as you add more and more features you're going to learn that you might have to increase it) and anything between the version you define and what the current highest version is (19, at the moment) can run it. They all might have slightly different experiences, but it'll all be similar in general (like, I have an ActionBar in my app and it looks pretty different between JellyBean and Gingerbread, but it's there nonetheless).

The main thing is that for backwards compatibility there are support libraries that you'll have to download and include in your app which aren't there by default (android-support-v4.jar for example).

A big tool you can use if you want to include certain features on higher API devices is check to see the current API of the device) and then implement accordingly. The most important thing is testing on different level APIs to make sure your app works on all of them.

Community
  • 1
  • 1
Embattled Swag
  • 1,479
  • 12
  • 23
1

Answer to Question 1

You can develop your application using any API version. In Android Manifest.XML file, you specify the Minimum SDK version that your application supports. Based on that value, your application works in all API ranging from the min value to the current Value.

Please note that you can specify the MAX SDK value supported but this is not recommended.

Answer to Question 2

Once you develop an application, it is good if you test it on various API versions. If you download different platform versions, then you will be able to create different emulators and test your application. But your application will work successfully even if you install only latest version.

Also, as a developer, from the application code, you can make your application utilize certain libraries supported in higher version and do not use those SDK if the application is running in low API devices. You can do this through code.

Similarly, compatibility issues can also be addressed in code.

Prem
  • 4,823
  • 4
  • 31
  • 63
0

You can configured minimum and Maximum API level in Manifest file.So that you can covered maximum device.Please put following code in your manifest file,

     <uses-sdk
          android:minSdkVersion="15"
          android:targetSdkVersion="17" />

Thus your application can run on device having API level between 15 to 17.

Narendra
  • 1,824
  • 1
  • 11
  • 4