My app can open the following file formats:
- kml (application/vnd.google-earth.kml+xml)
- kmz (application/vnd.google-earth.kmz)
- gpx (application/gpx+xml)
I'm trying to set up properly my intent filters so that my app is proposed when trying to open one of these file types, through the following schemes:
- http
- https
- file
- content
I would expect the following filter to catch all cases (except files with dots in the name, but that's another problem):
<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" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:scheme="content" />
<data android:pathPattern=".*\\.kml" />
<data android:pathPattern=".*\\.kmz" />
<data android:pathPattern=".*\\.gpx" />
<data android:mimeType="application/vnd.google-earth.kml+xml" />
<data android:mimeType="application/vnd.google-earth.kmz" />
<data android:mimeType="application/gpx+xml" />
</intent-filter>
But if the file explorer does not set properly the GPX content type, GPX files are not recognized (even though they are properly named, with ".gpx" extension).
Does someone know what's the problem?