AndroidManifest. xml file (uses-library)

Source: Internet
Author: User

SYNTAX (SYNTAX ):

<Uses-libraryandroid: name = "string"
Android: required = ["true" | "false"]/>

Included IN (contained in ):

<Application>

DESCRIPTION ):

This element is used to specify the shared class library that the application must connect. This element tells the system the class library code contained in the class loader of the application package.

All Android packages (such as andorid. app, android. content, android. view, and android. widget) are in the default class library automatically linked to the application. However, some packages are in independent class libraries and cannot be automatically linked to the application package. To view the documents of these packages, to determine which class libraries to include in the package code.

This element also affects the installation of the application on a special device and the availability of the application on Google Play.

Installation)

If this element appears in the Application List and its android: required attribute is set to true, unless the class library exists on your device, otherwise, the PackageManager framework will not allow users to install this application.

Google Play

Google Play filters applications based on the class libraries installed on users' devices. For more information about filtering, see Filters on Google Play (http://developer.android.com/guide/appendix/market-filters.html)

ATTRIBUTES (ATTRIBUTES ):

Android: name

This attribute is used to specify the name of the class library. This name is provided in the corresponding class library document. For example, the android. test. runner library is a package containing the Android test class.

Android: required

This attribute is used to specify whether the application requires a class library specified by the android: name attribute:

True: the application without this library cannot work. If this class library does not exist on your device, the system does not allow the application to be installed on this device.

False: If the class is in stock, the application can use this class library, but if necessary, it can also be designed to do not have this class library, and the application can also work. The system allows the application to be installed even if the class library does not exist. If false is used, check the validity of the class library at runtime.

You can use the reflection mechanism to check whether a specific class is valid.

The default value is true.

This attribute is introduced in API Level 7.

Included IN (introduced in ):

API Level 1

 

 

From FireOfStar's column

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.