Home | History | Annotate | Download | only in manifest
      1 page.title=<permission-tree>
      2 parent.title=The AndroidManifest.xml File
      3 parent.link=manifest-intro.html
      4 @jd:body
      5 
      6 <dl class="xml">
      7 <dt>syntax:</dt>
      8 <dd><pre class="stx">&lt;permission-tree android:<a href="#icon">icon</a>="<i>drawable resource</i>"
      9                  android:<a href="#label">label</a>="<i>string resource</i>" ]
     10                  android:<a href="#nm">name</a>="<i>string</i>" /&gt;</pre></dd>
     11 
     12 <dt>contained in:</dt>
     13 <dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code></dd>
     14 
     15 <dt>description:</dt>
     16 <dd itemprop="description">Declares the base name for a tree of permissions.  The application takes
     17 ownership of all names within the tree.  It can dynamically add new permissions
     18 to the tree by calling <code>{@link android.content.pm.PackageManager#addPermission PackageManager.addPermission()}</code>.  Names within the tree are separated by
     19 periods ('{@code .}').  For example, if the base name is
     20 {@code com.example.project.taxes}, permissions like the following might be
     21 added:
     22 
     23 <p style="margin-left: 2em">{@code com.example.project.taxes.CALCULATE}
     24 <br/>{@code com.example.project.taxes.deductions.MAKE_SOME_UP}
     25 <br/>{@code com.example.project.taxes.deductions.EXAGGERATE}</p>
     26 
     27 <p>
     28 Note that this element does not declare a permission itself, only a
     29 namespace in which further permissions can be placed.  See the
     30 <code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code>
     31 element for information on declaring permissions.
     32 
     33 <dt>attributes:</dt>
     34 <dd><dl class="attr">
     35 <dt><a name="icon"></a>{@code android:icon}</dt>
     36 <dd>An icon representing all the permissions in the tree.  This attribute
     37 must be set as a reference to a drawable resource containing the image
     38 definition.</dd>
     39 
     40 <dt><a name="label"></a>{@code android:label}</dt>
     41 <dd>A user-readable name for the group.  As a convenience, the label can
     42 be directly set as a raw string for quick and dirty programming.  However,
     43 when the application is ready to be published, it should be set as a
     44 reference to a string resource, so that it can be localized like other
     45 strings in the user interface.</dd>
     46 
     47 <dt><a name="nm"></a>{@code android:name}</dt>
     48 <dd>The name that's at the base of the permission tree.  It serves as
     49 a prefix to all permission names in the tree.  Java-style scoping should
     50 be used to ensure that the name is unique.  The name must have more than
     51 two period-separated segments in its path &mdash; for example,
     52 {@code com.example.base} is OK, but {@code com.example} is not.</dd>
     53 
     54 </dl></dd>
     55 
     56 <!-- ##api level indication## -->
     57 <dt>introduced in:</dt>
     58 <dd>API Level 1</dd>
     59 
     60 <dt>see also:</dt>
     61 <dd><code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code>
     62 <br/><code><a href="{@docRoot}guide/topics/manifest/permission-group-element.html">&lt;permission-group&gt;</a></code>
     63 <br/><code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">&lt;uses-permission&gt;</a></code>
     64 </dd>
     65 
     66 </dl>
     67