Android Tutorial

(avery) #1

By : Ketan Bhimani


106 

Specifying the Minimum SDK Version

You should always specify the minSdkVersion attribute for your
application. This value represents the lowest Android SDK version
your application supports.

For example, if your application requires APIs introduced in Android
SDK 1.6, you would check that SDK’s documentation and find that
this release is defined as API Level 4. Therefore, add the following
to your Android Manifest file within the

tag block:

It’s that simple. You should use the lowest API level possible if you
want your application to be compatible with the largest number of
Android handsets. However, you must ensure that your application
is tested sufficiently on any non-target platforms (any API level
supported below your target SDK, as described in the next section).

Specifying the Target SDK Version

You should always specify the targetSdkVersion attribute for your
application. This value represents the Android SDK version your
application was built for and tested against.

For example, if your application was built using the APIs that are
backward-compatible to Android 1.6 (API Level 4), but targeted
and tested using Android 2.2 SDK (API Level 8), then you would
want to specify the targetSdkVersion attribute as 8.Therefore, add
the following to your Android manifest file within the <manifest>
tag block:

Free download pdf