- syntax:
<permission-tree android:icon="drawable resource" android:label="string resource" ] android:name="string" />
- contained in:
<manifest>
- description:
- Declares the base name for a tree of permissions. The application takes
ownership of all names within the tree. It can dynamically add new permissions
to the tree by calling
. Names within the tree are separated by periods ('PackageManager.addPermission()
.
'). For example, if the base name iscom.example.project.taxes
, permissions like the following might be added: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 a permission itself, only a namespace in which further permissions can be placed. See the
<permission>
element for information on declaring permissions. - attributes:
android:icon
- An icon representing all the permissions in the tree. This attribute must be set as a reference to a drawable resource containing the image definition.
android:label
- A user-readable name for the group. As a convenience, the label can be directly set as a raw string for quick and dirty programming. However, when the application is ready to be published, it should be set as a reference to a string resource, so that it can be localized like other strings in the user interface.
android:name
- The name that's at the base of the permission tree. It serves as
a prefix to all permission names in the tree. Java-style scoping should
be used to ensure that the name is unique. The name must have more than
two period-separated segments in its path — for example,
com.example.base
is OK, butcom.example
is not.
- introduced in:
- API Level 1
- see also:
<permission>
<permission-group>
<uses-permission>
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2019-12-27 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]