Android.Content.Context.EnforceCallingOrSelfUriPermission Method
If the calling process of an IPC or you has not been granted permission to access a specific URI, throw Java.Lang.SecurityException.

Syntax

[Android.Runtime.Register("enforceCallingOrSelfUriPermission", "(Landroid/net/Uri;ILjava/lang/String;)V", "GetEnforceCallingOrSelfUriPermission_Landroid_net_Uri_ILjava_lang_String_Handler")]
public abstract void EnforceCallingOrSelfUriPermission (Android.Net.Uri uri, [Android.Runtime.GeneratedEnum] ActivityFlags modeFlags, string message)

See Also

Context.CheckCallingOrSelfUriPermission(Android.Net.Uri, Android.Content.ActivityFlags)

Parameters

uri
The uri that is being checked.
modeFlags
The type of access to grant. May be one or both of Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION.
message
A message to include in the exception if it is thrown.

Remarks

If the calling process of an IPC or you has not been granted permission to access a specific URI, throw Java.Lang.SecurityException. This is the same as Context.EnforceCallingUriPermission(Android.Net.Uri, Android.Content.ActivityFlags, Android.Content.ActivityFlags), except it grants your own permissions if you are not currently processing an IPC. Use with care!

[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