ContextWrapper.GrantUriPermission(String, Uri, ActivityFlags) Method

Definition

Grant permission to access a specific Uri to another package, regardless of whether that package has general permission to access the Uri's content provider.

[Android.Runtime.Register("grantUriPermission", "(Ljava/lang/String;Landroid/net/Uri;I)V", "GetGrantUriPermission_Ljava_lang_String_Landroid_net_Uri_IHandler")]
public override void GrantUriPermission (string? toPackage, Android.Net.Uri? uri, Android.Content.ActivityFlags modeFlags);
[<Android.Runtime.Register("grantUriPermission", "(Ljava/lang/String;Landroid/net/Uri;I)V", "GetGrantUriPermission_Ljava_lang_String_Landroid_net_Uri_IHandler")>]
override this.GrantUriPermission : string * Android.Net.Uri * Android.Content.ActivityFlags -> unit

Parameters

toPackage
String

The package you would like to allow to access the Uri.

uri
Uri

The Uri you would like to grant access to.

Attributes

Remarks

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