Achieving the Minimum
Android, like most operating systems, goes through various revisions, versions, and changes. Some of these affect the Android SDK, meaning there are new classes, methods, or parameters you can use that you could not in previous versions of the SDK.
If you want to ensure your application is run only on devices that have a certain version (or higher) of the Android environment, you will want to add a uses‑sdk element as a child of the root element in your file. The element has one attribute, , indicating which SDK version your application requires:
At the time of this writing, there are two possible values:
• 1, indicating the original Android 1.0 SDK
• 2, indicating the Android 1.1 SDK
If you leave the element out entirely, it will behave as though is set to 1.
If you set , the application will install only on compatible devices. You do not have to specify the latest SDK, but if you choose an older one, it is up to you to ensure your application works on every SDK version you claim is compatible. For example, if you leave off , in effect you are stipulating that your application works on every Android SDK version ever released, and it is up to you to test your application to determine if this is indeed the case.
PART 2
Activities
CHAPTER 4
Дата добавления: 2015-05-16; просмотров: 604;