I use an Intent Filter to associate my app with my proprietary file type, so the user can tap the file and open it in my app. Until recently I've been using one based on the file name:
<action android:name="android.intent.action.VIEW" /><category android:name="android.intent.category.DEFAULT" /><category android:name="android.intent.category.BROWSABLE" /><data android:mimeType="*/*" /><data android:scheme="file" /><data android:scheme="content" /><data android:host="*" /><data android:pathPattern=".*\\.rhr" />
(plus other variations of pathPattern to allow for folders)
It seems that since Android 7, apps are not able to share File URLs Official docs. No problem, we can just use a Mime Type:
<action android:name="android.intent.action.VIEW" /><category android:name="android.intent.category.DEFAULT" /><category android:name="android.intent.category.BROWSABLE" /><data android:scheme="file" /><data android:scheme="content" /><data android:mimeType="[???]" />
Except that some apps don't send a mime type. For example, the Samsung My Files app sends an empty string as the mime type.
I could resort to using "*/*", but that's a sure way to annoy people. Are there any other options?