Android.Content.Context.CheckCallingPermission Method
Determine whether the calling process of an IPC you are handling has been granted a particular permission.

Syntax

[Android.Runtime.Register("checkCallingPermission", "(Ljava/lang/String;)I", "GetCheckCallingPermission_Ljava_lang_String_Handler")]
public abstract Android.Content.PM.Permission CheckCallingPermission (string permission)

See Also

Android.Content.PM.PackageManager.CheckPermission(string, System.String)
Context.CheckPermission(string, System.Int32, System.Int32)
Context.CheckCallingOrSelfPermission(string)

Parameters

permission
The name of the permission being checked.

Returns

Documentation for this section has not yet been entered.

Remarks

Determine whether the calling process of an IPC you are handling has been granted a particular permission. This is basically the same as calling Context.CheckPermission(string, System.Int32, System.Int32) with the pid and uid returned by Android.OS.Binder.CallingPid and Android.OS.Binder.CallingUid. One important difference is that if you are not currently processing an IPC, this function will always fail. This is done to protect against accidentally leaking permissions; you can use Context.CheckCallingOrSelfPermission(string) to avoid this protection.

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1