Defining Your Application Using the Android Manifest File

Defining Your Application Using the Android Manifest File

Specifying the Maximum SDK Version

You will rarely want to specify the maxSdkVersion attribute for your application.This value represents the highest Android SDK version your application supports, in terms of API level. It restricts forward-compatibility of your application. One reason you might want to set this attribute is if you want to limit who can install the application to exclude devices with the newest SDKs. For example, you might develop a free beta version of your application with plans for a paid version for the newest SDK. By setting the maxSdkVersion attribute of the manifest file for your free application, you disallow anyone with the newest SDK to install the free version of the application.The downside of this idea? If your users have phones that receive over-the-air SDK updates, your application would cease to work (and appear) on phones where it had functioned perfectly, which might “upset” your users and result in bad ratings on your market of choice. The short answer: Use maxSdkVersion only when absolutely necessary and when you understand the risks associated with its use.

Enforcing Application Platform Requirements

Android devices have different hardware and software configurations. Some devices have built-in keyboards and others rely upon the software keyboard. Similarly, certain Android devices support the latest 3-D graphics libraries and others provide little or no graphics support.The Android manifest file has several informational tags for flagging the system features and hardware configurations supported or required by an Android application.

Specifying Supported Input Methods

The tag can be used to specify which input methods the application supports.There are different configuration attributes for five-way navigation, the hardware keyboard and keyboard types; navigation devices such as the directional pad, trackball, and wheel; and touch screen settings. There is no “OR” support within a given attribute. If an application supports multiple input configurations, there must be multiple tags—one for each complete configuration supported. For example, if your application requires a physical keyboard and touch screen input using a finger or a stylus, you need to define two separate tags in your manifest file, as follows: For more information about the tag of the Android manifest file, see the Android SDK reference at http://developer.android.com/guide/topics/ manifest/uses-configuration-element.html.  .

Formation et coursTélécharger le document complet

Télécharger aussi :

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *