Androidmanifest configuration File Parsing II--<manifest>

Source: Internet
Author: User

Grammar
<manifest xmlns:android= "http://schemas.android.com/apk/res/android" package          = "string"           Android:shareduserid= "string"          Android:shareduserlabel= "string resource"           android: Versioncode= "integer"          android:versionname= "string"          android:installlocation=[ "Auto" | "Internalonly" | "Preferexternal" >    ... </manifest>
Included tags

None

Tags that must be included

<application>

Tags that can be included
<compatible-screens>  // compatible        screens <instrumentation>  // test Equipment <permission>  <permission-group><permission-tree><supports-gl-texture>  <supports-screens><uses-configuration><uses-feature><uses-permission><uses-sdk>
Describe

The root element of the Androidmanifest.xml file. It must contain the <application> element and must indicate the xmls:android and package attribute.

Property Description Xmls:android

The default Android namespace. This property value should be set to:

"Http://schemas.android.com/apk/res/android".

Package

A package name that identifies a Java language format for application. This registration must be unique. can contain uppercase and lowercase letters, numbers, and underscores. The first element should be a letter.

The package name should start with the reverse of the company URL, for example, the package name developed by Google should start with Com.google. Never use Com.example as the package name for the release project.

The package name of application should be unique, it is also the name of the engineering process (see <application> process attribute Element), and defines an activity's task affinity ( Task sharing) (see Taskaffinity attribute for <activity> Element).

Note: Once you publish the application, the application package name cannot be changed. If you change the package name, it is considered a new application, and the user cannot update to the new version based on the old version.

Android:shareuseeid

The name of the Linux user ID that will be shared to other application. By default, each Android application has its own unique user ID. However, when the same value for this attribute is set at two or more application, they will share the ID and they should also use the same signature. Applications with the same user ID will be able to access each other's data and also run in the same process. (See more details)

Android:versioncode

The version number. Application this property value to determine whether the application has a new version. The new version number is higher than the old version number. This is not the version number of the app that is shown to the user and is displayed to the user in the real versionname settings.

The value of this property must be an integer. You can define it at will, but make sure the new version number is larger than the old one.

Android:versionname

The version number of the application that is displayed to the user. This property value can be a string resource. In addition to showing the user, there is no use for it.

Android:installlocation

Application the default installation location. Must be one of the following values.

"Internalonly"--The default value. Defines that the application must be installed in memory. If there is not enough memory, the installation fails.

The "Auto"--application is installed by default in memory and installed on external storage media (e.g. SD Card) if memory is not enough. When the program is installed, the user can also set to move the app to memory or external storage media.

The "preferexternal"--application is installed on the external storage media (SDcard). But there is no guarantee that the installation will succeed. If the external storage media is unavailable or full, the application is installed into memory. When the program is installed, the user can also set to move the app to memory or external storage media.

That is, if you do not set this attribute property value to "Auto" or "preferexternal", application can only be installed in memory.

When the application is installed on an external storage medium:

The 1.apk file is saved to an external storage medium, but the application data (such as a database, etc.) is saved to memory.

2. The container that holds the. apk file will be encrypted with a randomly generated key, so that only the settings of the installed program can use data that exists on the external storage media.

3. Application can be moved to memory, if permitted by the user.

When this property value is not set to Internalonly (the default), application can be moved from memory to external storage media, but set to Internalonly or no value is set, Application is not allowed to move from memory to external storage media.

Read the app Install location for more information about this property.

Introduced

API Level 1

See ALSO:

  <application>

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.