22. Application tag description in Android

Source: Internet
Author: User

<application>

<applicationAndroid:allowclearuserdata=["True" | "false"]
android:allowtaskreparenting=["True" | "false"]
android:backupagent="string"
android:debuggable=["True" | "false"]
android:description="string resource"
android:enabled=["True" | "false"]
Android:hascode=["True" | "false"]
Android:icon="drawable resource"
Android:killafterrestore=["True" | "false"]
Android:label="string resource"
android:managespaceactivity="string"
Android:name="string"
android:permission="string"
android:persistent=["True" | "false"]
android:process="string"
android:restoreanyversion=["True" | "false"]
android:taskaffinity="string"
Android:theme="resource or Theme">
. . .
</application>

Contained under the:<manifest> element

Can contain:

<activity>

<activity-alias>

<service>

<receiver>

<provider>

<uses-library>

Describe:

The application's declaration. This element contains child elements that declare the component of the application, and the attributes of the element will affect all components under the application. Many properties set the default for the component

Value. Some properties set global values and cannot be modified by the component.

Property:

1, Android:allowclearuserdata

Whether to give the user permission to delete user data, if true, the application manager has permission to clear the data; false. The default is true.

2, Android:allowtaskreparenting

Whether an application-defined activities can be transferred from a task that is initiated to a task that has the same and will be brought to the foreground. True they can be shifted, if false,

They must be kept together with the task of initiating them. The default is False.

3, Android:backupagent

Implements the class name of the backup agent for the application, backupagent subclasses. The name of this property is the fully qualified class name (for example, "Com.example.project.MyBackupAgent").

However, if the first letter of the name is set to a point number, it can also be a class name (for example, ". Mybackupagent "), he will be appended to the package name defined in the <manifest> element.

There is no default value.

4, Android:debuggable

Whether the app can use debug or even run in user mode. True can, false cannot. The default is False.

5, Android:description

User-readable, longer and more application-specific descriptions than app tags. This value must be a reference string. Unlike tags, he cannot be set to hard-coded strings. There is no default value.

6, android:enabled

Whether the Android system can instantiate the components of the app. If true, if False is not possible. If true, this component is determined by the Enabled property of each component

is available. If False, he overrides the component's specified value, and all components will not be used. The default is true.

7, Android:hascode

Whether the app contains code. True indicates contains, false means not included. When the value is False, the startup component is any code that the system does not try to load the app. The default is true.

8, Android:icon

The icon for the entire app, or the default icon for each component. This property value must be set to a reference to the drawable resource. There is no default value.

9, Android:killafterrestore

In an integer system reset operation, the application should be terminated when his settings are reset. The reset operation of a single package does not cause the app to be closed. The recovery operation of the entire system represents only

Sex occurs once when the phone is set for the first time. This property will not be used frequently by third-party apps.

The default value is true, meaning that when the entire system is restored, the app runs to play with his data and terminates.

10, Android:label

An easy-to-read app tag, and is also the default label for each component of the app. This tag should be set to reference string resources, and of course he can be like other strings in the user

specified in the interface. For convenience, however, an undefined string can be set when the application is developed.

11, Android:managespaceactivity

The fully qualified name of an activity subclass that can be initiated by the system to allow the user to manage the storage space that the app occupies. This activity should also be declared with the <activity> element.

12, Android:name

The fully qualified name of the application subclass that is implemented for this application. When the app starts, the class will be instantiated before other components of the app.

This subclass is optional, and most applications do not. By default, Android uses an instance of the base application class.

13, Android:permission

The name of the license that the customer must set in order to interact with the app. This property is a convenient way to set the license for the app's components. He can be overridden by the component's Permission property.

14, Android:persistent

Whether the app remains running at all times. True is, false is not. The default is False. Typically, the app should not set this identity. Persistent mode is only specified by several system applications.

15, Android:process

Set a running process name for the component under application. Each component can define its own process name by setting its own processes property.

By default, Android creates a process for the app when the first component of the app needs to run. All components run under the same process. The name of this process and the <manifest>

The Backage property name is the same as the element setting.

By setting this property to be shared in other apps, you can coordinate the application's components to run in the same process, but only two apps also share the user ID and sign the same certificate.

If the name of this property starts with a colon (":"), a new private process will be created. If the name of a process starts with a lowercase letter, a common process is created.

A common process can be shared by other applications to reduce the use of resources.

16, Android:restoreanyversion

Indicates that the application is ready to attempt to recover all of the backup data sets, even if the backup data is stored with a number higher than the currently installed application. Set to True to allow the backup manager to try

Recovery when the version does not match, meaning a data conflict. Use carefully. The default is False.

17, Android:taskaffinity

Provides a similar name to all the components under the application, in addition to the component that sets its own Taskaffinity property. By default, all components use the same affinity. Name of the affinity

Same as the package name set in the <manifest> element.

18, Android:theme

Define a topic that references a style resource for the component under application. Individual activities can set their own theme by setting their own theme properties.

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.