Context.CheckSelfPermission(String) Method

Definition

Determine whether <em>you</em> have been granted a particular permission.

[Android.Runtime.Register("checkSelfPermission", "(Ljava/lang/String;)I", "GetCheckSelfPermission_Ljava_lang_String_Handler", ApiSince=23)]
public abstract Android.Content.PM.Permission CheckSelfPermission (string permission);
[<Android.Runtime.Register("checkSelfPermission", "(Ljava/lang/String;)I", "GetCheckSelfPermission_Ljava_lang_String_Handler", ApiSince=23)>]
abstract member CheckSelfPermission : string -> Android.Content.PM.Permission

Parameters

permission
String

The name of the permission being checked.

Returns

Permission

PackageManager#PERMISSION_GRANTED if you have the permission, or PackageManager#PERMISSION_DENIED if not.

Attributes

Remarks

Java documentation for android.content.Context.checkSelfPermission(java.lang.String).

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.

Applies to