My app has a feature that browse files on your phone and SD card and open them using other apps. I want a solution where I don\'t have to specify the MimeType and can work w
Use this method to get the MIME type from the uri of the file :
public static String getMimeType(String url) {
String type = null;
String extension = url.substring(url.lastIndexOf(".") + 1);
if (extension != null) {
type = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension);
}
return type;
}