PackageManager.CheckPermission(String, 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.
Check whether a particular package has been granted a particular permission.
[Android.Runtime.Register("checkPermission", "(Ljava/lang/String;Ljava/lang/String;)I", "GetCheckPermission_Ljava_lang_String_Ljava_lang_String_Handler")]
public abstract Android.Content.PM.Permission CheckPermission (string permName, string packageName);
[<Android.Runtime.Register("checkPermission", "(Ljava/lang/String;Ljava/lang/String;)I", "GetCheckPermission_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member CheckPermission : string * string -> Android.Content.PM.Permission
Parameters
- permName
- String
The name of the permission you are checking for.
- packageName
- String
The name of the package you are checking against.
Returns
If the package has the permission, PERMISSION_GRANTED is returned. If it does not have the permission, PERMISSION_DENIED is returned.
- Attributes
Remarks
Check whether a particular package has been granted a particular permission.
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.