Android Development-api Guide-<permission-tree>

Source: Internet
Author: User

<permission-tree>

English Original: http://developer.android.com/guide/topics/manifest/permission-tree-element.html
Acquisition (update) Date: 2014-5-30
Moved from the original blog: http://blog.sina.com.cn/s/blog_48d491300100zmv3.html

Grammar:
<android:icon= "drawable resource"     android:label= "string Resource "     android:name=" string "/>
Included in:
<manifest>
Description
Declares the base name of the permission tree. The application owns all the names in the tree. You can PackageManager.addPermission() add new permissions dynamically by calling in the permissions tree. The names in the tree are separated by a period (' . '). For example, assuming the base name is com.example.project.taxes , you can add permissions that are similar to the following format:

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

Note This element does not declare the permissions themselves, but only defines a namespace for subsequent permissions to be added. For more information on declaring permissions, see <permission> elements.

Property:
android:icon
An icon that represents all the permissions in the tree. This property must be set to a reference to the drawable resource that contains the definition of the picture.
android:label
The name of the permission group for the user to read. For convenience, a quick and clumsy programming method can be set directly to a string. However, when the application prepares to publish, it should be set as a reference to the string so that it can be localized like other strings in the user interface.
android:name
the base name of the permission tree, which is used as the prefix for all permissions in the tree. To ensure the uniqueness of the name, Java-style domain name rules should be used. The path to the name must contain at least two period-delimited fields-for example: com.example.base Yes, but com.example not.
Introduced from:
API Level 1
See:
<permission>
<permission-group>
<uses-permission>

Android Development-api Guide-<permission-tree>

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.