A detailed interpretation of application tags in Android systems _android

Source: Internet
Author: User

< application/>: declaration of application. The
element contains child elements that declare the applied component, and the attributes of the element will affect all components under the application. Many properties set a default value for a component, and some properties set global values and cannot be modified by components. The child nodes of the
<application> describe the components that the application contains, and its properties affect all of its child node components. Properties such as Icon/lable/permission set a default value for the child node component and can be overwritten. Attributes such as debuggable/enabled are the global properties of the entire application and cannot be overwritten.

  <application android: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" > ... 

Included under the:<manifest> element.
Can contain:


1, Android:allowclearuserdata
Whether to give the user the right to delete user data, if True Application Manager has permission to purge data; false. The default is true.
2, Android:allowtaskreparenting
Whether the application defined activities can be transferred from the started task to the task that he 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 starting them. The default is False.
3, Android:backupagent
The class name of the backup agent that implements the application, and the Backupagent subclass of the. The name of this property is due to the fully qualified class name (for example, "Com.example.project.MyBackupAgent").
However, if the first letter of the name is set to the dot number, it can also be the class name, such as. Mybackupagent "), he will be appended to the package name defined in the <manifest> element.
There is no default value.
4, Android:debuggable
Whether the application 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 descriptions than application tags. This value must be a reference string. Unlike labels, he cannot be set to hard-coded strings. There is no default value.
6, android:enabled
Whether the Android system can instantiate the application's components. If true, if False is not possible. If true, the Enabled property for each component determines this component
is available. If False, he overrides the component-specified value, and all components will not be used. The default is true.
7, Android:hascode
Whether the application contains code. True to include, false means not included. False when the boot component is the system does not try to load the application of any code. The default is true.
8, Android:icon
The entire application icon, 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, whether the application should be terminated when his settings are reset. A single package reset operation does not cause the application to be closed. Recovery operations for the entire system represent only
Sex happens once, when the phone is set for the first time. Third-party applications will not use this attribute frequently.
The default value is true, meaning that when the entire system is restored, the application runs to play with his data and will terminate.
10, Android:label
An easy to read application label, and the default label for each component that is applied. This label should be set to a reference string resource, and of course he can also like other strings in the user
interface specified in the. However, for convenience, when applying development, you can set an undefined string.
11, Android:managespaceactivity
The fully qualified name of an activity subclass, which can be initiated by the system to allow the user to manage the storage space occupied by the application. This activity should also be declared with the <activity> element.
12, Android:name
The fully qualified name of the application subclass implemented for this application. When the application starts, the class is instantiated before the other components that are applied.
This subclass is optional; Most applications are not required. By default, Android uses an instance of the basic application class.
13, Android:permission
The name of the license that the customer must set in order to interact with the application. This property is a convenient way to set permissions for the application's components. He can be overridden by the component's Permission property.
14, Android:persistent
Whether the application remains running at all times. True is, false is not. The default is False. Typically, the application should not set this identity. Persistence 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 processing properties.
By default, Android creates a process for the application when the first component of the application needs to be run. All components run under the same process. The name of this process and the <manifest>
The Backage property name of the element setting is the same.
By setting this property to be shared in other applications, you can coordinate the application's components to run in the same process, but only two applications share the user ID and sign the same certificate.
If the name of this property starts with a colon (":"), a new private process is created. If the name of a process begins with a lowercase letter, a public 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 in a higher number than the currently installed application. Setting to True will allow the backup manager to try
Restore when version does not match, meaning data conflict. Be careful to use it. The default is False.
17, Android:taskaffinity
Provides a similar name for all components under application, in addition to the component that sets its own Taskaffinity property. By default, all components use the same affinity. Name of Affinity
Is the same as the package name set in the <manifest> element.
18, Android:theme
Defines a topic that references a resource from a style to the component under application. Individual activities can set their own theme by setting their own theme properties.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.