AppOpsManager.PermissionToOp(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the app-op name associated with a given permission.
[Android.Runtime.Register("permissionToOp", "(Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=23)]
public static string? PermissionToOp(string permission);
[<Android.Runtime.Register("permissionToOp", "(Ljava/lang/String;)Ljava/lang/String;", "", ApiSince=23)>]
static member PermissionToOp : string -> string
Parameters
- permission
- String
String: The permission. This value cannot be null.
Returns
The app-op associated with the permission or null.
- Attributes
Remarks
Gets the app-op name associated with a given permission. The app-op name is one of the public constants defined in this class such as OPSTR_COARSE_LOCATION. This API is intended to be used for mapping runtime permissions to the corresponding app-op.
Android reference for android.app.AppOpsManager.permissionToOp.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.