I want to download custom files from email to my app. I used intent filters below as suggested by Richard Legget. The app works fine in the Eclipse VM and downloads the file, but won't work when installed on Nexus 7 (Kit Kat) or Acer (ICS) tablets. The View button shows up on the email attachment in the VM but not on the real tablets. Any ideas would be appreciated.
</intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="*"
android:mimeType="application/fdh"
android:pathPattern=".*\\.fdh" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="*"
android:mimeType="application/octet-stream"
android:pathPattern=".*\\.fdh" />
</intent-filter>
Solved it with help from @Sergey. My custom file is in fact XML format so I now save as an xml file and use this:-
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="com.mydomain.myapp"
android:mimeType="text/xml"
android:pathPattern=".*\\.xml" />
</intent-filter>