Android.Content.ContentResolver.OpenTypedAssetFileDescriptor Method
Open a raw file descriptor to access (potentially type transformed) data from a "content:" URI.

Syntax

[Android.Runtime.Register("openTypedAssetFileDescriptor", "(Landroid/net/Uri;Ljava/lang/String;Landroid/os/Bundle;Landroid/os/CancellationSignal;)Landroid/content/res/AssetFileDescriptor;", "")]
public Android.Content.Res.AssetFileDescriptor OpenTypedAssetFileDescriptor (Android.Net.Uri uri, string mimeType, Android.OS.Bundle opts, Android.OS.CancellationSignal cancellationSignal)

Parameters

uri
The desired URI to open.
mimeType
The desired MIME type of the returned data. This can be a pattern such as */*, which will allow the content provider to select a type, though there is no way for you to determine what type it is returning.
opts
Additional provider-dependent options.
cancellationSignal
A signal to cancel the operation in progress, or null if none. If the operation is canceled, then Android.OS.OperationCanceledException will be thrown.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.IO.FileNotFoundExceptionThrows FileNotFoundException of no data of the desired type exists under the URI.

Remarks

Open a raw file descriptor to access (potentially type transformed) data from a "content:" URI. This interacts with the underlying ContentProvider.OpenTypedAssetFile(Android.Net.Uri, System.String, System.String) method of the provider associated with the given URI, to retrieve retrieve any appropriate data stream for the data stored there.

Unlike ContentResolver.OpenAssetFileDescriptor(Android.Net.Uri, System.String), this function only works with "content:" URIs, because content providers are the only facility with an associated MIME type to ensure that the returned data stream is of the desired type.

All text/* streams are encoded in UTF-8.

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1