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