Context.GrantUriPermission(String, Uri, ActivityFlags) Context.GrantUriPermission(String, Uri, ActivityFlags) Method


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


String String

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

Uri Uri

The Uri you would like to grant access to.


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