<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>