Condividi tramite


ContentResolver.GetStreamTypes(Uri, String) Method

Definition

Query for the possible MIME types for the representations the given content URL can be returned when opened as as stream with #openTypedAssetFileDescriptor.

[Android.Runtime.Register("getStreamTypes", "(Landroid/net/Uri;Ljava/lang/String;)[Ljava/lang/String;", "GetGetStreamTypes_Landroid_net_Uri_Ljava_lang_String_Handler")]
public virtual string[]? GetStreamTypes (Android.Net.Uri url, string mimeTypeFilter);
[<Android.Runtime.Register("getStreamTypes", "(Landroid/net/Uri;Ljava/lang/String;)[Ljava/lang/String;", "GetGetStreamTypes_Landroid_net_Uri_Ljava_lang_String_Handler")>]
abstract member GetStreamTypes : Android.Net.Uri * string -> string[]
override this.GetStreamTypes : Android.Net.Uri * string -> string[]

Parameters

url
Uri

A Uri identifying content (either a list or specific type), using the content:// scheme.

mimeTypeFilter
String

The desired MIME type. This may be a pattern, such as &#47;, to query for all available MIME types that match the pattern.

Returns

String[]

Returns an array of MIME type strings for all available data streams that match the given mimeTypeFilter. If there are none, null is returned.

Attributes

Remarks

Query for the possible MIME types for the representations the given content URL can be returned when opened as as stream with #openTypedAssetFileDescriptor. Note that the types here are not necessarily a superset of the type returned by #getType -- many content providers cannot return a raw stream for the structured data that they contain.

Java documentation for android.content.ContentResolver.getStreamTypes(android.net.Uri, java.lang.String).

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