getType

open fun getType(uri: Uri): String

Implement this to handle requests for the MIME type of the data at the given URI.

Note that there are no permissions needed for an application to access this information; if your content provider requires read and/or write permissions, or is not exported, all applications can still call this method regardless of their access permissions. This allows them to retrieve the MIME type for a URI when dispatching intents.

Return

a MIME type string, or null if there is no type.

Parameters

uri

the URI to query.