diff options
| author | Claude <noreply@anthropic.com> | 2026-05-15 22:13:31 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-05-15 22:13:31 +0000 |
| commit | 2d6d686f241cf28afbf1c9c391a3380a0be1e085 (patch) | |
| tree | ff9e7231d2c5ce240a30409f2df0cdeafab9f695 /android-app/app/src/main/AndroidManifest.xml | |
| parent | d3dc75f02cec03b04846b4be88902d6b4d6c89de (diff) | |
fix: target Android 16 correctly for GPX file handler
Android's MimeTypeMap does not include application/gpx+xml for .gpx on
all devices, so file managers fall back to text/xml or application/xml.
Add intent-filters for both XML MIME types and check OpenableColumns
DISPLAY_NAME in code before parsing — so Nav appears in the chooser for
XML files but only processes ones named *.gpx.
Remove the broken file:// pathSuffix filter (irrelevant on Android 16,
also syntactically invalid when combined with mimeType in a single <data>
element). Remove unnecessary BROWSABLE category from file-open filters.
https://claude.ai/code/session_01DNjbYxiC1cco83dArNGW3G
Diffstat (limited to 'android-app/app/src/main/AndroidManifest.xml')
| -rw-r--r-- | android-app/app/src/main/AndroidManifest.xml | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/android-app/app/src/main/AndroidManifest.xml b/android-app/app/src/main/AndroidManifest.xml index 35f8dd3..196932d 100644 --- a/android-app/app/src/main/AndroidManifest.xml +++ b/android-app/app/src/main/AndroidManifest.xml @@ -34,26 +34,30 @@ <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> - <!-- application/gpx+xml: standard MIME type, recognised on Android 12+ --> + <!-- GPX as standard MIME type (used by apps that know the type) --> <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:mimeType="application/gpx+xml" /> </intent-filter> - <!-- application/gpx: older variant sent by some file managers and email clients --> + <!-- GPX older variant --> <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:mimeType="application/gpx" /> </intent-filter> - <!-- file:// URIs from legacy file managers; extension filtered in code --> + <!-- GPX as XML — Android's MimeTypeMap often maps .gpx to text/xml because + application/gpx+xml isn't in the base system database. Code checks the + display name before parsing. --> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> - <data android:scheme="file" android:host="*" android:pathSuffix=".gpx" - android:mimeType="*/*" /> + <data android:mimeType="text/xml" /> + </intent-filter> + <intent-filter> + <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> + <data android:mimeType="application/xml" /> </intent-filter> </activity> </application> |
