Skip to content

Most visited

Recently visited

navigation

<uses-permission-sdk-23>

syntax:
<uses-permission-sdk-23 android:name="string"
        android:maxSdkVersion="integer" />
Contained in:
<manifest>
Description:
Specifies that an app wants a particular permission, but only if the app is running on a device with API level 23 or higher. If the device is running API level 22 or lower, the app does not have the specified permission.

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 <uses-permission-sdk-23> element instead of <uses-permission>, you can request the permission only if the app is running on platforms that support the runtime permissions model, in which the user grants permissions to the app while it is running.

For more information on permissions, see the Permissions section in the introduction and the separate System Permissions API guide. A list of permissions defined by the base platform is available at android.Manifest.permission.

Attributes:
android:name
The name of the permission. This permission can be defined by the app with the <permission> element, it can be a permission defined by another app, or it can be one of the standard system permissions, such as "android.permission.CAMERA" or "android.permission.READ_CONTACTS".
android:maxSdkVersion
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.
introduced in:
API Level 23
see also:
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)