Posts

Showing posts with the label Intentfilter

Android How To Create Intent Filter For Custom File Extension That Does NOT Make It Part Of A Chooser For Everything On The Phone

Answer : The only way to solve this problem is add scheme and host attributes to your intent filter: <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:scheme="file" /> <data android:mimeType="*/*" /> <data android:pathPattern=".*\\.tgtp" /> <data android:host="*" /> </intent-filter> That is because in documentation says that android:pathPattern only works if has an scheme and host defined. http://developer.android.com/guide/topics/manifest/data-element.html Hope it helps. I've been struggling with this quite a bit for a custom file extension, myself. After a lot of searching, I found this web page where the poster discovered that Android's patternMatcher class (which is used for the pathPattern matching in Intent-Filters) has unexpected behavior when y...