isImageUri

open fun isImageUri(@NonNull context: Context, @NonNull uri: Uri): Boolean

Checks whether the content returned by resolving uri has an image MIME type.

Return

true when uri points to image content (has mime type image/*).

Parameters

context

The context used to resolve mime type via .

uri

A content provider URI with supported scheme (i.e. content://).