AndroidManifest. xml file (1)

Source: Internet
Author: User

Each application must have an AndroidManifest. xml file in its root directory. This list submits the basic information of the application to the Android system. The information system must be established before the application code can run. The following are some things to do in the configuration file:

1. Name the application with a Java package. The package name is the unique identifier of the application;

2. Describe the components of the application --- the Activity, Service, Broadcast Receiver, and Content Provider of the application. It must be named by the Implementation class of each component and publish corresponding component functions (for example, Intent messages that can be processed by the component ). These declarations enable the Android system to understand the components in the application and the conditions for these components to be loaded.

3. Determine which processes are the main application components.

4. Declare the permissions required by the application to access protected APIs and interact with other applications.

5. to interact with application components, other required permissions are also declared.

6. lists the Instrumentation classes that provide analysis and other information when the application is running. These classes are declared in the inventory file only when the application is developed and tested. These classes are to be deleted before the application is released.

7. Declare the minimum Android API level required by the application.

8. List external libraries that must be linked to the application.

Structure of the Manifest File

Contains the general structure of the configuration file and all elements that can be contained. All elements contained in each element are described in their respective documents.

<? Xml version = "1.0" encoding = "UTF-8"?>
<Manifest>
<Uses-permission/>
<Permission/>
<Permission-tree/>
<Permission-group/>
<Instrumentation/>
<Uses-sdk/>
<Uses-configuration/>
<Uses-feature/>
<Supports-screens/>
<Compatible-screens/>
<Supports-gl-texture/>
<Application>
<Activity>
<Intent-filter>
<Action/>
<Category/>
<Data/>
</Intent-filter>
<Meta-data/>
</Activity>
<Activity-alias>
<Intent-filter>... </intent-filter>
<Meta-data/>
</Activity-alias>
<Service>
<Intent-filter>... </intent-filter>
<Meta-data/>
</Service>
<Cycler>
<Intent-filter>... </intent-filter>
<Meta-data/>
</Cycler>
<Provider>
<Grant-uri-permission/>
<Meta-data/>
</Provider>
<Uses-library/>
</Application>
</Manifest>

The following lists all elements in the list file alphabetically. When these elements are required, the Android system does not allow you to add custom elements or attributes.

<Action>
<Activity>
<Activity-alias>
<Application>
<Category>
<Data>
<Grant-uri-permission>
<Instrumentation>
<Intent-filter>
<Manifest>
<Meta-data>
<Permission>
<Permission-group>
<Permission-tree>
<Provider>
<Cycler>
<Service>
<Supports-screens>
<Uses-configuration>
<Uses-feature>
<Uses-library>
<Uses-permission>
<Uses-sdk>

 

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.