1page.title=<uses-permission>
2parent.title=The AndroidManifest.xml File
3parent.link=manifest-intro.html
4@jd:body
5
6<dl class="xml">
7
8 <div class="sidebox-wrapper"> 
9  <img id="rule" src="{@docRoot}assets/images/grad-rule-qv.png"> 
10  <div id="qv-sub-rule"> 
11    <img src="{@docRoot}assets/images/icon_play.png" style="float:left;margin:0;padding:0;"> 
12    <p style="color:#669999;padding-top:1em;"><code style="color:#669999;">&lt;uses-permission&gt;</code> and filtering on Google Play. </p>
13
14<p style="margin-top:1em;">In some cases, the permissions that you request
15through <code>&lt;uses-permission&gt;</code> can affect how
16your application is filtered by Google Play.</p>
17
18<p style="margin-top:1em;">If you request a hardware-related permission &mdash;
19<code>CAMERA</code>, for example &mdash; Google Play assumes that your
20application requires the underlying hardware feature and filters the application
21from devices that do not offer it.</p>
22
23<p style="margin-top:1em;">To control filtering, always explicitly declare
24hardware features in <code>&lt;uses-feature&gt;</code> elements, rather than
25relying on Google Play to "discover" the requirements in
26<code>&lt;uses-permission&gt;</code> elements. Then, if you want to disable
27filtering for a particular feature, you can add a
28<code>android:required="false"</code> attribute to the
29<code>&lt;uses-feature&gt;</code> declaration.</p>
30
31<p style="margin-top:1em;" class="caution">For a list of permissions that imply
32hardware features, see the documentation for the <a
33href="{@docRoot}guide/topics/manifest/uses-feature-element.html#permissions-features">
34<code>&lt;uses-feature&gt;</code></a> element.</p>
35</div>
36</div>
37
38
39<dt>syntax:</dt>
40<dd><pre class="stx">&lt;uses-permission android:<a href="#nm">name</a>="<i>string</i>" /&gt;</pre></dd>
41
42<dt>contained in:</dt>
43<dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code></dd>
44
45<dt>description:</dt>
46<dd>Requests a permission that the application must be granted in 
47order for it to operate correctly.  Permissions are granted by the user when the 
48application is installed, not while it's running.
49
50<p>
51For more information on permissions, see the 
52<a href="{@docRoot}guide/topics/manifest/manifest-intro.html#perms">Permissions</a></code> 
53section in the introduction and the separate 
54<a href="{@docRoot}guide/topics/security/security.html">Security and Permissions</a> document.  
55A list of permissions defined by the base platform can be found at 
56{@link android.Manifest.permission android.Manifest.permission}.
57
58<dt>attributes:</dt>
59<dd><dl class="attr">
60<dt><a name="nm"></a>{@code android:name}</dt>
61<dd>The name of the permission.  It can be a permission defined by the 
62application with the <code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code> 
63element, a permission defined by another application, or one of the 
64standard system permissions, such as "{@code android.permission.CAMERA}" 
65or "{@code android.permission.READ_CONTACTS}".  As these examples show, 
66a permission name typically includes the package name as a prefix.</dd>
67
68</dl></dd>
69
70<!-- ##api level indication## -->
71<dt>introduced in:</dt>
72<dd>API Level 1</dd>
73
74<dt>see also:</dt>
75<dd>
76<ul>
77  <li><code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code></li>
78  <li><code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code></li>
79</ul>
80</dd>
81
82</dl>
83