Android from scratch

December 22, 2009

What’s with the various API levels and types in the SDK?

Filed under: SDK level 2.0.1, n00b frustrations — Tags: , , , , — luke @ 2:59 pm

(As of SDK 2.0.1)

The API levels 1.0 through 2.0.1 are versions of the framework with which you develop Android applications (see http://developer.android.com/guide/appendix/api-levels.html for more). They’re fairly backward compatible but not completely. These are also referred to by integer API numbers and sometimes names:

  • 1 = version 1.0
  • 2 = version 1.1
  • 3 = version 1.5 (Cupcake)
  • 4 = version 1.6 (Donut)
  • 5 = version 2.0 (Eclair)
  • 6 = version 2.0.1

various_apis

The devices out there may be one of several different versions. At the time of writing, my stock T-Mobile G1 is at 1.6 (and may never get 2.0 as evidently the memory requirements are prohibitive). The Droid runs 2.0. I seem to recall hearing of another phone that was still stuck on 1.5 (the Cliq?). If you want to know the relative percentages of what’s out there, check the Platform Versions Dashboard.

When you develop an application, you have to specify what API level you’re developing for. Then the device will know whether it can support your application. For the widest support you’ll want the earliest feasible API (probably 1.5 for now), but then you’re missing out on the features of later APIs.

When you’re selecting the “target” for creating an emulator or developing an app, you also have a choice of developing against the Google APIs or not. These add more libraries for your application to use – currently, this is basically just if you want to integrate Google Maps into your application; later versions of the API may have other useful libraries. The language of “Google API” is a bit confusing when added to SDK/Android API versioning. It’s added functionality on top of the standard Android platform – each “Google APIs” target also includes the API platform with the number given.

Powered by WordPress