Context.GrantUriPermission(String, Uri, ActivityFlags) Context.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 abstract void GrantUriPermission (string toPackage, Android.Net.Uri uri, Android.Content.ActivityFlags modeFlags);
abstract member GrantUriPermission : string * Android.Net.Uri * Android.Content.ActivityFlags -> unit

Parameters

toPackage
String String

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

uri
Uri Uri

The Uri you would like to grant access to.

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