Well, after some experimentation, I found out that android:mimeType is optional. Therefore, the solution:
<intent-filter android:icon="@drawable/ic_fx_602p_pf" android:label="FX-602P Program File" android:priority="1" > <category android:name="android.intent.category.DEFAULT" ></category> <action android:name="android.intent.action.VIEW" ></action> <data android:host="" android:mimeType="*/*" android:pathPattern=".*\\.pf" android:scheme="file" ></data> <data android:host="*" android:mimeType="application/x-fx-602p.program" ></data> </intent-filter>
As additional information, I found out that <intent-filter> can have two or more <data> tags. If either a match, the name of the call (logical OR)
Inside the tag, all attributes must match (logical AND).
However, there is a problem with this solution: it seems that there is an error in Android 2.x, and the <data> attributes are not strictly processed logically. As a result, all files are mapped when the android:mimeType attribute is set. Ah, well, you cannot have it in both directions and will go with the future, if so.
Martin Dec 18 '13 at 17:10 2013-12-18 17:10
source share