


When you call this method, Android opens the system permission dialog that the user can use to grant or deny the permission. Use Permission.RequestUserPermission to request the permission to use the data or feature. Use Permission.HasUserAuthorizedPermission to check if the user has already granted permission for the data or feature the application requires.įor a code sample that shows how to use this API, see Permission.HasUserAuthorizedPermission. If the user still denies the application permission, it’s best practice to provide a method that lets the user manually trigger the permission request again from inside the application.If the application can’t work without this functionality, inform the user. If the user denies the application permission, disable the application’s functionality that requires the specific permission.If the user hasn’t granted permission, send a request for permission to access the data or use the device feature that the application requires.If they have, you don’t need to request it again. Check whether the user has already granted the application permission.

The Android.Permission API provides functionality that you can use to check what permissions the application currently has and request permissions that the application requires but doesn’t have.Īn overview of the process to request permission at runtime is as follows: For more information, see Declare permissions for an application. In the Other Settings > Identification section, set Target API Level to at least level 23.īefore the application requests permission to use restricted data or a particular device feature, it must declare the permission in its Android App Manifest.In the Project settings window, select the Player tab, then open Android Player Settings:.The runtime permissions API requires Android version 6 (API level 23). Google’s guideline for requesting permissions recommends that, if the user denies a permission request once, you should display the reason for the request and present the request again.įor more information on when and how you should request permissions on an Android device, see App permissions best practices in the Android developer guide. The output is either drawn to the screen or captured as a texture. This page explains how to request the user’s permission for your application to access data on the device or use a device feature such as a built-in camera A component which creates an image of a particular viewpoint in your scene.
