What is API level and how is it used?

android API level

Search Google for: android API level

Search Android Developers Group for: android API level

Search Android Beginers Group for: android API level

Search Google Code for: android API level

Search Android Issues Database for: android API level

You can discover the build version number from Build.Version class


incremental
Release
SDK

incremental is an internal number

release looks like 1.0 or 1.5

SDK is a number starting at 1

API level is same as Build.Version.SDK

Read this thread on how to use this for cross compiles

Here is a formal discussion of API level

The Android 1.1 system image delivers an updated version of the framework API. As with the Android 1.0 API, the Android 1.1 API is assigned an integer identifier ? 2 ? that is stored in the system itself. This identifier, called the "API Level", allows the system to correctly determine whether an application is compatible with the system, prior to installing the application.

Applications can reference a specific API Level value in their manifest files, to indicate the minimum version of the Android system required to run the app. To reference a minimum API Level, applications can add a minSdkVersion attribute in their manifest files. The value of the attribute is an integer corresponding to an API Level identifier. Prior to installing an application, the system then checks the value of minSdkVersion and allows the install only if the referenced integer is less than or equal to the API Level integer stored in the system itself.

Each SDK version like 1.4 is allocated an API level number such as 3

A minSDKVersion should point out to the API Level number


<manifest>
  ...
  <uses-sdk minSdkVersion="2" />
  ...
</manifest>

The will be installed but may fail to run during runtime when it tries to use an API that doesn't exist in the platform. So if your app is 1.5, then it will run only on 1.5 or later assuming the later versions are backward compatible.

If your application does not use any new APIs introduced in Android 1.1, you can indicate Android 1.0 compatibility by removing minSdkVersion or setting the attribute to "1". However, before publishing your application, you must make sure to compile your application against the Android 1.0 system image (available in the Android 1.0 SDK), to ensure that it builds and functions properly for Android 1.0 devices. You should test the application against system images corresponding to the API Levels that the application is designed to be compatible with

If you are sure your application is not using Android 1.1 APIs and has no need to use them, you might find it easier to keep working in the Android 1.0 SDK, rather than migrating to the Android 1.1 SDK and having to do additional testing.


android 1.5 - api level 3, 
android 1.6 - api level 4,
android 2.1 - api level 7
android 2.2 - api level 8

minSDKVersion is same as API level

android release names and api levels

Search for: android release names and api levels

here is the list of API levels and their release names