DocumentsProvider.OpenDocumentThumbnail 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.
Open and return a thumbnail of the requested document.
[Android.Runtime.Register("openDocumentThumbnail", "(Ljava/lang/String;Landroid/graphics/Point;Landroid/os/CancellationSignal;)Landroid/content/res/AssetFileDescriptor;", "GetOpenDocumentThumbnail_Ljava_lang_String_Landroid_graphics_Point_Landroid_os_CancellationSignal_Handler")]
public virtual Android.Content.Res.AssetFileDescriptor? OpenDocumentThumbnail (string? documentId, Android.Graphics.Point? sizeHint, Android.OS.CancellationSignal? signal);
[<Android.Runtime.Register("openDocumentThumbnail", "(Ljava/lang/String;Landroid/graphics/Point;Landroid/os/CancellationSignal;)Landroid/content/res/AssetFileDescriptor;", "GetOpenDocumentThumbnail_Ljava_lang_String_Landroid_graphics_Point_Landroid_os_CancellationSignal_Handler")>]
abstract member OpenDocumentThumbnail : string * Android.Graphics.Point * Android.OS.CancellationSignal -> Android.Content.Res.AssetFileDescriptor
override this.OpenDocumentThumbnail : string * Android.Graphics.Point * Android.OS.CancellationSignal -> Android.Content.Res.AssetFileDescriptor
Parameters
- documentId
- String
the document to return.
- sizeHint
- Point
hint of the optimal thumbnail dimensions.
- signal
- CancellationSignal
used by the caller to signal if the request should be cancelled. May be null.
Returns
- Attributes
Exceptions
Remarks
Open and return a thumbnail of the requested document.
A provider should return a thumbnail closely matching the hinted size, attempting to serve from a local cache if possible. A provider should never return images more than double the hinted size.
If you perform expensive operations to download or generate a thumbnail, you should periodically check CancellationSignal#isCanceled()
to abort abandoned thumbnail 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.