How can I get MIME type from android resource URI ?
The URI look like:
android.resource://com.package.name/drawable/resourceName
I tried
ContentResolver cR = context.getContentResolver();
MimeTypeMap mime = MimeTypeMap.getSingleton();
mimetype = mime.getExtensionFromMimeType(cR.getType(uri));
But returned MIME type is null
And
String url = uri.toString();
String extension = MimeTypeMap.getFileExtensionFromUrl(url);
mimetype = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
but there is no extension ...