I have an app that generates custom file types (.sor). Inside the app I have a feature to send an email with one of these files attached. I also have an intent filter to all
I've solved this, mostly by shooting in the dark and without really understand WHY what I did solved it, but here is what I have for my intent filters in the manifest now, where ".sor" is the extension of my custom file type. This works with all email and file management apps that I have tried, including K-9 mail and Astro:
<!-- For email attachments -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/*" host="*" android:pathPattern=".*.sor" android:scheme="content" />
</intent-filter>
<!-- For file browsers -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="application/*" host="*" android:pathPattern=".*.sor" android:scheme="file" />
</intent-filter>