Freigeben über


MediaStore.SetRequireOriginal(Uri) Method

Definition

Update the given Uri to indicate that the caller requires the original file contents when calling ContentResolver#openFileDescriptor(Uri, String).

[Android.Runtime.Register("setRequireOriginal", "(Landroid/net/Uri;)Landroid/net/Uri;", "", ApiSince=29)]
public static Android.Net.Uri SetRequireOriginal (Android.Net.Uri uri);
[<Android.Runtime.Register("setRequireOriginal", "(Landroid/net/Uri;)Landroid/net/Uri;", "", ApiSince=29)>]
static member SetRequireOriginal : Android.Net.Uri -> Android.Net.Uri

Parameters

uri
Uri

Returns

Uri
Attributes

Remarks

Update the given Uri to indicate that the caller requires the original file contents when calling ContentResolver#openFileDescriptor(Uri, String).

This can be useful when the caller wants to ensure they're backing up the exact bytes of the underlying media, without any Exif redaction being performed.

If the original file contents cannot be provided, a UnsupportedOperationException will be thrown when the returned Uri is used, such as when the caller doesn't hold android.Manifest.permission#ACCESS_MEDIA_LOCATION.

Java documentation for android.provider.MediaStore.setRequireOriginal(android.net.Uri).

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