CloudMediaProvider.OnOpenMedia(String, Bundle, CancellationSignal) 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.
Returns the full size media item identified by mediaId
.
[Android.Runtime.Register("onOpenMedia", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/os/ParcelFileDescriptor;", "GetOnOpenMedia_Ljava_lang_String_Landroid_os_Bundle_Landroid_os_CancellationSignal_Handler", ApiSince=33)]
public abstract Android.OS.ParcelFileDescriptor OnOpenMedia (string mediaId, Android.OS.Bundle? extras, Android.OS.CancellationSignal? signal);
[<Android.Runtime.Register("onOpenMedia", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/os/ParcelFileDescriptor;", "GetOnOpenMedia_Ljava_lang_String_Landroid_os_Bundle_Landroid_os_CancellationSignal_Handler", ApiSince=33)>]
abstract member OnOpenMedia : string * Android.OS.Bundle * Android.OS.CancellationSignal -> Android.OS.ParcelFileDescriptor
Parameters
- mediaId
- String
the media item to return
- extras
- Bundle
to modify the way the fd is opened, there's none at the moment, but some might be implemented in the future
- signal
- CancellationSignal
used by the OS to signal if the request should be cancelled
Returns
read-only file descriptor for accessing the media file
- Attributes
Remarks
Returns the full size media item identified by mediaId
.
If you block while downloading content, you should periodically check CancellationSignal#isCanceled()
to abort abandoned open requests.
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.