Freigeben über


ContentProvider.GetStreamTypes(Uri, String) Method

Definition

Called by a client to determine the types of data streams that this content provider supports for the given URI.

[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 uri, 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

uri
Uri

The data in the content provider being queried.

mimeTypeFilter
String

The type of data the client desires. May be a pattern, such as &#47; to retrieve all possible data types.

Returns

String[]

Returns null if there are no possible data streams for the given mimeTypeFilter. Otherwise returns an array of all available concrete MIME types.

Attributes

Remarks

Called by a client to determine the types of data streams that this content provider supports for the given URI. The default implementation returns null, meaning no types. If your content provider stores data of a particular type, return that MIME type if it matches the given mimeTypeFilter. If it can perform type conversions, return an array of all supported MIME types that match mimeTypeFilter.

Java documentation for android.content.ContentProvider.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

See also

  • GetType(Uri)
  • <xref:Android.Content.ContentProvider.OpenTypedAssetFile(Android.Net.Uri%2c+System.String%2c+System.String)>
  • <xref:Android.Content.ClipDescription.CompareMimeTypes(System.String%2c+System.String)>