Reputation: 45
If we have a file with a custom extension like .abc, can I open this file with the app?
How can we show our app under the suggestion list in "open with" options?
Upvotes: 2
Views: 92
Reputation: 1390
You can try this in your AndroidManifest.xml
:
<activity ...>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file"
android:host="*"
android:pathPattern=".*\\.abc"
android:mimeType="*/*" />
</intent-filter>
</activity>
More to read: https://developer.android.com/guide/components/intents-filters.
Upvotes: 1