AndroidManifest. xml file (permission-tree)

Source: Internet
Author: User

SYNTAX (SYNTAX ):

<Permission-treeandroid: icon = "drawable resource"
Android: label = "string resource"]
Android: name = "string"/>

Included IN (contained in ):

<Manifest>

DESCRIPTION ):

This element is used to declare the root node name of the permission tree. The application holds the permissions corresponding to all the permission names defined in the tree. By calling the PackageManager. addPermission () method, you can dynamically add new permissions. The names in the tree are separated. For example, if the name of the heel node is com. example. project. taxes, you can use the following format to add permissions:

Com. example. project. taxes. CALCULATE
Com. example. project. taxes. deductions. MAKE_SOME_UP
Com. example. project. taxes. deductions. EXAGGERATE

Note that this element does not declare permissions. It is just a namespace with more permissions. For more information about permission declaration, see the <permission> element.

ATTRIBUTES (ATTRIBUTES ):

Android: icon

This attribute defines an icon that represents all permissions in the tree. This attribute must be set by referencing a customizable resource that contains image definitions.

Android: label

Define a user-readable name for the permission tree. To facilitate application development, you can directly use the native string to set this attribute. However, when an application is officially released, you should reference a string resource to set this attribute, so that it can be localized like other properties in the user interface.

Android: name

This attribute defines the name of the permission tree root node. It is used as the prefix of all permission names in the tree. Java Naming rules should be used to ensure the uniqueness of names. There must be more than two "." To separate the names. For example, com. example. base is correct, but com. example is incorrect.

INTRODUCED version (introduced in)

API Level 1

 


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.