I have a custom file extension like .foo that I want to associate my app with. I created this Intent-Filter:
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<!--data android:scheme="file" android:pathPattern=".*\\.foo"/-->
<data android:scheme="file" android:mimeType="*/*" android:pathPattern=".*\\.foo" android:host="*"/>
</intent-filter>
The problem is that this doesn’t work on some devices. For example, only the following works with the Samsung Galaxy S3 (Android version: 4.4.2):
<data android:scheme="file" android:mimeType="*/*" android:pathPattern=".*\\.foo" android:host="*"/>
However, with a LG G2 (Android version: 4.4.2), only this line works:
<data android:scheme="file" android:pathPattern=".*\\.foo"/>
To make it even worse, the Nexus 7 (Android-Version: 5.0) doesn’t seem to recognize custom file endings at all.
Has anyone ever had a similar problem and knows a solution?