1 page.title=<uses-permission-sdk-23> 2 page.tags="uses-permission-sdk-23","permissions","uses-permission-sdk23" 3 parent.title=The AndroidManifest.xml File 4 parent.link=manifest-intro.html 5 @jd:body 6 7 <dl class="xml"> 8 9 <dt>syntax:</dt> 10 <dd><pre class="stx"><uses-permission-sdk-23 android:<a href="#nm">name</a>="<i>string</i>" 11 android:<a href="#maxSdk">maxSdkVersion</a>="<i>integer</i>" /></pre></dd> 12 13 <dt>Contained in:</dt> 14 <dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code></dd> 15 16 <dt> 17 Description: 18 </dt> 19 20 <dd itemprop="description"> 21 Specifies that an app wants a particular permission, but <em>only</em> if 22 the app is running on a device with <a 23 href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API 24 level</a> 23 or higher. If the device 25 is running API level 22 or lower, the app does not have the specified 26 permission. 27 28 <p> 29 This element is useful when you update an app to include a new 30 feature that requires an additional permission. If a user updates an app on a 31 device that is running API level 22 or lower, the system prompts the user 32 at install time to grant all new permissions that are declared in that 33 update. If a new feature is minor enough, you may prefer to disable 34 the feature altogether on those devices, so the user does not have to grant 35 additional permissions to update the app. By using the 36 <code><uses-permission-sdk-23></code> element instead of <a href= 37 "uses-permission-element.html"><code><uses-permission></code></a>, 38 you can request the permission <em>only</em> if the app is running on 39 platforms that support the <a 40 href="{@docRoot}training/permissions/requesting.html">runtime permissions</a> 41 model, in which the user 42 grants permissions to the app while it is running. 43 </p> 44 45 <p> 46 For more information on permissions, see the <a href= 47 "{@docRoot}guide/topics/manifest/manifest-intro.html#perms">Permissions</a> 48 section in the introduction and the separate <a href= 49 "{@docRoot}guide/topics/security/permissions.html">System Permissions</a> 50 API guide. A list of permissions defined by the base platform is available 51 at {@link android.Manifest.permission android.Manifest.permission}. 52 </p> 53 </dd> 54 55 <dt>Attributes:</dt> 56 57 <dd> 58 <dl class="attr"> 59 60 <dt><a name="nm"></a>{@code android:name}</dt> 61 62 <dd> 63 The name of the permission. This permission can be defined by the 64 app with the <code><a href= 65 "{@docRoot}guide/topics/manifest/permission-element.html"><permission></a></code> 66 element, it can be a permission defined by another app, or it can be one 67 of the standard system permissions, such as 68 {@link android.Manifest.permission#CAMERA "android.permission.CAMERA"} 69 or {@link android.Manifest.permission#READ_CONTACTS 70 "android.permission.READ_CONTACTS"}. 71 </dd> 72 73 <dt><a name="maxSdk"></a>{@code android:maxSdkVersion}</dt> 74 <dd> 75 The highest API level at which this permission should be granted to your 76 app. If the app is installed on a device with a later API level, the app 77 is not granted the permission and cannot use any related functionality. 78 </dd> 79 </dl> 80 </dd> 81 82 <!-- ##api level indication## --> 83 <dt>introduced in:</dt> 84 <dd>API Level 23</dd> 85 86 <dt>see also:</dt> 87 <dd> 88 <ul> 89 <li><code><a href="{@docRoot}guide/topics/manifest/permission-element.html"><permission></a></code></li> 90 <li><a href= 91 "uses-permission-element.html"><code><uses-permission></code></a></li> 92 <li><code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-feature></a></code></li> 93 </ul> 94 </dd> 95 96 </dl> 97