summaryrefslogtreecommitdiff
path: root/android-app/app/src/main/AndroidManifest.xml
diff options
context:
space:
mode:
Diffstat (limited to 'android-app/app/src/main/AndroidManifest.xml')
-rw-r--r--android-app/app/src/main/AndroidManifest.xml38
1 files changed, 35 insertions, 3 deletions
diff --git a/android-app/app/src/main/AndroidManifest.xml b/android-app/app/src/main/AndroidManifest.xml
index 196932d..a10d503 100644
--- a/android-app/app/src/main/AndroidManifest.xml
+++ b/android-app/app/src/main/AndroidManifest.xml
@@ -46,9 +46,7 @@
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/gpx" />
</intent-filter>
- <!-- 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. -->
+ <!-- Generic XML — some file managers use this for .gpx; code checks display name -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
@@ -59,6 +57,40 @@
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/xml" />
</intent-filter>
+ <!-- Google Files on Android 16 sends application/octet-stream for .gpx because
+ MimeTypeMap has no entry for that extension. The ExternalStorageProvider URI
+ encodes the full file path, so pathSuffix=".gpx" keeps this targeted.
+ Code double-checks via OpenableColumns.DISPLAY_NAME before parsing. -->
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:scheme="content" android:mimeType="application/octet-stream"
+ android:pathSuffix=".gpx" />
+ </intent-filter>
+
+ <!-- Share-sheet filters (ACTION_SEND): file URI is in EXTRA_STREAM, not
+ intent data, so pathSuffix can't help — these cover apps that type .gpx
+ correctly. Code checks display name for the XML variants. -->
+ <intent-filter>
+ <action android:name="android.intent.action.SEND" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="application/gpx+xml" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.SEND" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="application/gpx" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.SEND" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="text/xml" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.SEND" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="application/xml" />
+ </intent-filter>
</activity>
</application>
</manifest>