Creating a Distributable APK File
Before you jump in and create the distributable APK, you should take great care to make sure that your application is available to as many users as possible. This is done with the uses-sdk element in the AndroidManifest.xml. Your AndroidManifest.xml file currently has a uses-sdk entry that you created in Chapter 8, which is shown here:
<uses-sdk android:minSdkVersion=“4” />
The minSdkVersion property in this line identifies which versions of the Android platform can install this application. In this instance, level 4 has been selected. However, for your Screen Brightness Toggle application, you set the target SDK to version 11. So version 4 is the minimum SDK even though you're targeting the version 11 SDK? How can all of this madness work?
The Android platform, for the most part, is backwards compatible. Most of the features in version 11 are also in version 12. Yes, small changes — and sometimes even large components — exist between these versions, but almost everything else in the platform remains backwards compatible. Therefore, stating that this application needs a minimum of SDK version 11 only signifies that any Android operating system that is of version 11 or greater can run the application.
Using the minSdkVersion information, the Android Market is able to determine which applications to show each user of each device. If you were to release the application right now with minSdkVersion set to the value of 4, and you opened the Android ...
Get Android™ Tablet Application Development For Dummies® now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.