ContentResolver.TakePersistableUriPermission(Uri, ActivityFlags) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Take a persistable URI permission grant that has been offered.
[Android.Runtime.Register("takePersistableUriPermission", "(Landroid/net/Uri;I)V", "GetTakePersistableUriPermission_Landroid_net_Uri_IHandler")]
public virtual void TakePersistableUriPermission (Android.Net.Uri uri, Android.Content.ActivityFlags modeFlags);
[<Android.Runtime.Register("takePersistableUriPermission", "(Landroid/net/Uri;I)V", "GetTakePersistableUriPermission_Landroid_net_Uri_IHandler")>]
abstract member TakePersistableUriPermission : Android.Net.Uri * Android.Content.ActivityFlags -> unit
override this.TakePersistableUriPermission : Android.Net.Uri * Android.Content.ActivityFlags -> unit
Parameters
- uri
- Uri
- modeFlags
- ActivityFlags
- Attributes
Remarks
Take a persistable URI permission grant that has been offered. Once taken, the permission grant will be remembered across device reboots. Only URI permissions granted with Intent#FLAG_GRANT_PERSISTABLE_URI_PERMISSION
can be persisted. If the grant has already been persisted, taking it again will touch UriPermission#getPersistedTime()
.
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.