Udostępnij za pośrednictwem


ContentResolver.GetType(Uri) Method

Definition

Return the MIME type of the given content URL.

[Android.Runtime.Register("getType", "(Landroid/net/Uri;)Ljava/lang/String;", "")]
public string? GetType (Android.Net.Uri url);
[<Android.Runtime.Register("getType", "(Landroid/net/Uri;)Ljava/lang/String;", "")>]
override this.GetType : Android.Net.Uri -> string

Parameters

url
Uri

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

Returns

A MIME type for the content, or null if the URL is invalid or the type is unknown

Attributes

Remarks

Return the MIME type of the given content URL.

Java documentation for android.content.ContentResolver.getType(android.net.Uri).

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