I am trying to write an intent filter that will allow my app to open files with extension ".mathref". Following the advice here, I wrote my filter like this:
<!-- For email attachments -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/*" host="*" />
<data android:pathPattern=".*\\.mathref"/>
<data android:scheme="content" />
</intent-filter>
However, it is not filtering! That is, if the user taps on any file in their email, regardless of the extension, it lists my app as an option for opening the file.
How can I fix that?