try {\r
Intent i = new Intent(Intent.ACTION_VIEW);\r
mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(storagePath.substring(storagePath.lastIndexOf('.') + 1));\r
- if (mimeType != mFile.getMimetype()) {\r
+ if (mimeType != null && !mimeType.equals(mFile.getMimetype())) {\r
i.setDataAndType(Uri.parse("file://"+mFile.getStoragePath()), mimeType);\r
i.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\r
startActivity(i);\r