Reputation: 4307
Hi below are my mobile device configuration can somebody help me in finding out about what will be my minSdkVersion and targetSdkVersion.
Sorry i am newbie and trying to understand how to find the api's
My Device is HTC OneX
Android Version: 4.03
HTC Sense Version: 4.0
Software number: 1.29.110.11
HTC SDK API Level: 4.12
HTC Extension version: HTCExtension_403_1_GA_7
Upvotes: 2
Views: 1876
Reputation: 21181
The minimum version of the Android platform on which the application will run, specified by the platform's API Level identifier.
Specifies the API Level on which the application is designed to run. In some cases, this allows the application to use manifest elements or behaviors defined in the target API Level, rather than being restricted to using only those defined for the minimum API Level.
The maximum version of the Android platform on which the application is designed to run, specified by the platform's API Level identifier. Important: Please read the documentation before using this attribute.
Upvotes: 2
Reputation: 82533
The minSdkVersion
and targetSdkVersion
are not dependent on the device you're using to debug your app.
minSdkVersion
is used to tell Android what is the minimum Android API you're targeting. App Stores like Google Play use this number to make sure your app isn't shown to devices running a version of Android lower than the ones you support. Even if someone tries to install you app through sideloading on a device with a lower SDK than minSdkVersion
, the system will not let the install take place. You should always declare this in your manifest. However, if you fail to do so it will default to 1
.
targetSdkVersion
informs the system that you have tested against the target version and the system should not enable any compatibility behaviors to maintain your app's forward-compatibility with the target version. The application is still able to run on older versions (down to minSdkVersion
).
As Android evolves with each new version, some behaviors and even appearances might change. However, if the API level of the platform is higher than the version declared by your app's targetSdkVersion
, the system may enable compatibility behaviors to ensure that your app continues to work the way you expect. You can disable such compatibility behaviors by specifying targetSdkVersion
to match the API level of the platform on which it's running. For example, setting this value to "11" or higher allows the system to apply a new default theme (Holo) to your app when running on Android 3.0 or higher and also disables screen compatibility mode when running on larger screens (because support for API level 11 implicitly supports larger screens).
There are many compatibility behaviors that the system may enable based on the value you set for this attribute. Several of these behaviors are described by the corresponding platform versions in the Build.VERSION_CODES reference.
To maintain your application along with each Android release, you should increase the value of this attribute to match the latest API level, then thoroughly test your application on the corresponding platform version.
Upvotes: 8