Add Snippet |
Get the Type of a File.
raw · copy · downloadContentResolver cR = context.getContentResolver(); MimeTypeMap mime = MimeTypeMap.getSingleton(); String type = mime.getExtensionFromMimeType(cR.getType(uri));
Preview
Editors
Tags
Related Snippets
Check if SD card is present
Get installed Applications with Name, Package Name, Version and Icon
Check for Updates Once a Day
Create a MD5-Hash and Dump as a Hex String
Add and Handle Menu Items
Enable and Disable WiFi
Interesting,
I was so lucky to find this post there is no explanation for this code , and and googled it for"Getting the Type of File as String"
Thanks for writing about it
great piece of code, it's truely handy
2 Comments
Interesting,
I was so lucky to find this post there is no explanation for this code , and and googled it for"Getting the Type of File as String"
Thanks for writing about it
great piece of code, it's truely handy