blob: 860d30fd0087ca911690e4674d008bd67d6feab4 [file] [log] [blame]
parent.title=The AndroidManifest.xml File
<dl class="xml">
<dd><pre class="stx">&lt;uses-permission-sdk-23 android:<a href="#nm">name</a>="<i>string</i>"
android:<a href="#maxSdk">maxSdkVersion</a>="<i>integer</i>" /&gt;</pre></dd>
<dt>Contained in:</dt>
<dd><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html">&lt;manifest&gt;</a></code></dd>
<dd itemprop="description">
Specifies that an app wants a particular permission, but <em>only</em> if
the app is running on a device with <a
level</a> 23 or higher. If the device
is running API level 22 or lower, the app does not have the specified
This element is useful when you update an app to include a new
feature that requires an additional permission. If a user updates an app on a
device that is running API level 22 or lower, the system prompts the user
at install time to grant all new permissions that are declared in that
update. If a new feature is minor enough, you may prefer to disable
the feature altogether on those devices, so the user does not have to grant
additional permissions to update the app. By using the
<code>&lt;uses-permission-sdk-23&gt;</code> element instead of <a href=
you can request the permission <em>only</em> if the app is running on
platforms that support the <a
href="{@docRoot}training/permissions/requesting.html">runtime permissions</a>
model, in which the user
grants permissions to the app while it is running.
For more information on permissions, see the <a href=
section in the introduction and the separate <a href=
"{@docRoot}guide/topics/security/permissions.html">System Permissions</a>
API guide. A list of permissions defined by the base platform is available
at {@link android.Manifest.permission android.Manifest.permission}.
<dl class="attr">
<dt><a name="nm"></a>{@code android:name}</dt>
The name of the permission. This permission can be defined by the
app with the <code><a href=
element, it can be a permission defined by another app, or it can be one
of the standard system permissions, such as
{@link android.Manifest.permission#CAMERA "android.permission.CAMERA"}
or {@link android.Manifest.permission#READ_CONTACTS
<dt><a name="maxSdk"></a>{@code android:maxSdkVersion}</dt>
The highest API level at which this permission should be granted to your
app. If the app is installed on a device with a later API level, the app
is not granted the permission and cannot use any related functionality.
<!-- ##api level indication## -->
<dt>introduced in:</dt>
<dd>API Level 23</dd>
<dt>see also:</dt>
<li><code><a href="{@docRoot}guide/topics/manifest/permission-element.html">&lt;permission&gt;</a></code></li>
<li><a href=
<li><code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature&gt;</a></code></li>