APK install-time association of a file name extension to a default app for viewing/opening

42 Views Asked by At

I assume this has to be in the manifest for the apk at install time.

e.g. I install an app that has the capability of viewing xxxxx.abc files, so I want the default for any ".abc" files to be my app, regardless of where those ".abc" files are in the directory hierarchy, or for that matter in email etc.

What needs to be in the manifest for that to happen? I presume it has to be something like:

<intent-filter label="MyAppName">
        <action name="android.intent.action.VIEW" />
        <category name="android.intent.category.BROWSABLE" />
        <category name="android.intent.category.DEFAULT" />
        <data scheme="file" />
        <data mimeType="application/abc" />
        <data host="*" />
        <data pathPattern=".*\.abc" />
</intent-filter>

...or something like that!

Thanks

0

There are 0 best solutions below