Introduction to creating applications and activity applications manifest files

Source: Internet
Author: User

Each Android project contains a Manifest file (Android manifest.xml), which is stored at the top level in the project hierarchy. Manifest can define the structure and metadata of an application and its components and requirements. It contains the nodes of each activity,service,content provider and broadcast receiver that make up the application and uses the intent Filter and permissions to determine how these components interact with each other and from other applications.

The manifest file can also specify metadata for the application (such as its icon, version number, or subject) and additional top-level nodes that can be used to specify required security permissions and unit tests, as well as to define hardware, screen, and platform support requirements. The manifest file consists of a root manifest tag with a package property that is set as a project bundle. It usually contains a xmlns:android property to provide some of the properties used within the file. Use the Versioncode property to define the current application version as an integer, which is incremented each time the version is iterated. Use Versionname to define a public version number that is displayed to the user. By using the InstallLocation property, you can also specify whether the application is allowed (or preferred) to be installed on external storage (usually an SD card) rather than on internal storage. To do this, the value can be specified as preferexternal or Outo, and when used, the application is installed on the external storage whenever possible, while the latter requires a system decision. If you do not specify the InstallLocation attribute, the application will be installed to internal storage and the user will not be able to move the application to external storage. The capacity of internal memory is generally limited, so it is best to install the application to external memory whenever possible.

Application manifest file Explanation

The following XML snippet shows a typical manifest node:

<manifest xmlns:android= "http://schemas.android.com/apk/res/android" package= "Com.paad.myapp" and            Roid:versioncode= "1" android:versionname= "0.9 Beta" android:installlocation= "preferexternal" > [... manifest nodes ...] </manifest>


Introduction to creating applications and activity applications manifest files

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.