I\'ve been working on an application which is set to open a file with a specific extension. It works some times with Gmail (some files open, while some don\'t), and I can op
You need to resolve your path yourself when the scheme is content, i.e. when you receive a URI to a ContentProvider. The system will look at the mime type for your by call to ContentResolver.getType(Uri uri) before your intent filter is checked, hence you need the code below.
Resolve the file path to your file by fetching a Cursor from the URI containing content scheme and query the _data column:
Cursor cursor = getContentResolver().query(URI, null, null, null, null);
if (cursor != null && cursor.moveToFirst()) {
int idx = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA);
return cursor.getString(idx);
}
And add this intent-filter: