What is API level and how is it used?

satya - Monday, April 20, 2009 11:25:19 AM

android API level

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

satya - Monday, April 20, 2009 11:34:14 AM

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

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

satya - Monday, April 20, 2009 11:36:21 AM

It has three values


incremental
Release
SDK

satya - Monday, April 20, 2009 11:36:45 AM

incremental is an internal number

incremental is an internal number

satya - Monday, April 20, 2009 11:36:57 AM

release looks like 1.0 or 1.5

release looks like 1.0 or 1.5

satya - Monday, April 20, 2009 11:37:20 AM

SDK is a number starting at 1

SDK is a number starting at 1

satya - Monday, April 20, 2009 11:45:50 AM

API level is same as Build.Version.SDK

API level is same as Build.Version.SDK

satya - Monday, April 20, 2009 11:48:49 AM

Read this thread on how to use this for cross compiles

Read this thread on how to use this for cross compiles

satya - Monday, April 20, 2009 11:55:22 AM

Here is a formal discussion of API level

Here is a formal discussion of API level

satya - Monday, April 20, 2009 11:56:33 AM

what is api level then?

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.

satya - Monday, April 20, 2009 11:57:32 AM

more on api level and minsdk version

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.

satya - Monday, April 20, 2009 12:40:22 PM

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

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

satya - Monday, April 20, 2009 12:41:05 PM

A minSDKVersion should point out to the API Level number

A minSDKVersion should point out to the API Level number

satya - Monday, April 20, 2009 12:41:31 PM

Here is an example of a manifest file


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

satya - Monday, April 20, 2009 12:45:48 PM

What if you don't speicify a minSDKVersion?

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.

satya - Monday, April 20, 2009 12:46:58 PM

The special privilege of 1.0 application

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

satya - Monday, April 20, 2009 12:47:32 PM

If you really don't need higher versions...

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.

satya - Thursday, October 07, 2010 1:12:34 PM

Some examples of android versions and api levels


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

satya - Thursday, October 07, 2010 1:14:05 PM

minSDKVersion is same as API level

minSDKVersion is same as API level

satya - Sat Sep 29 2012 14:23:35 GMT-0400 (Eastern Daylight Time)

android release names and api levels

android release names and api levels

Search for: android release names and api levels

satya - Sat Sep 29 2012 14:24:45 GMT-0400 (Eastern Daylight Time)

here is the list of API levels and their release names

here is the list of API levels and their release names