summaryrefslogtreecommitdiff
path: root/android-app/app/src/main/AndroidManifest.xml
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-05-20 08:38:33 +0000
committerClaude <noreply@anthropic.com>2026-05-20 08:38:33 +0000
commitd6a2e71c155f62a03e1ab466198a256c96c13b3b (patch)
tree465800f928be7a7ae2e7440db12a29a6c997a736 /android-app/app/src/main/AndroidManifest.xml
parent06fc6564b73ff2403eebabf5f9374a62abfe0772 (diff)
Fix GPX file opening, share sheet visibility, and add SAF track storage
Intent filter fixes: - Remove pathSuffix=".gpx" + scheme restriction from the application/octet-stream ACTION_VIEW filter; pathSuffix matches the URI path, not the filename, so it never fired against file manager content URIs (opaque paths like /provider/uuid). The existing display-name check in handleIncomingGpx() is the correct gate. - Add ACTION_SEND filter for application/octet-stream; Nav was invisible in share sheets because most file managers send this type for .gpx files. SAF-based track storage (API 29+): - Replace fragile SharedPrefs URI cache + OWNER_PACKAGE_NAME MediaStore query with Storage Access Framework as the primary write/read path. The user grants access to their tracks folder once via ACTION_OPEN_DOCUMENT_TREE; DocumentFile.listFiles() finds all GPX files without relying on MediaStore ownership (which Android clears on uninstall). After reinstall, a one-tap "Restore track access" button in Saved Tracks re-authorizes the same folder and all tracks immediately reappear. - MediaStore path (existing) is kept as fallback for tracks saved before this change - Add SafState enum (CONFIGURED / PERMISSION_LOST / NOT_CONFIGURED) in TrackStorage - TrackRepository exposes safState() and initSafDirectory() thin wrappers - MainViewModel exposes safState StateFlow and onSafDirectorySelected() - SavedTracksFragment observes safState and shows contextual setup / re-auth button - MainActivity registers safPickerLauncher and exposes launchSafPicker() - Add androidx.documentfile:documentfile:1.0.1 dependency https://claude.ai/code/session_01YUbuZNDAoLea4cf9UGQ9qn
Diffstat (limited to 'android-app/app/src/main/AndroidManifest.xml')
-rw-r--r--android-app/app/src/main/AndroidManifest.xml20
1 files changed, 11 insertions, 9 deletions
diff --git a/android-app/app/src/main/AndroidManifest.xml b/android-app/app/src/main/AndroidManifest.xml
index 5090190..23817bb 100644
--- a/android-app/app/src/main/AndroidManifest.xml
+++ b/android-app/app/src/main/AndroidManifest.xml
@@ -56,20 +56,17 @@
<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. -->
+ <!-- Many file managers send application/octet-stream with no path hints.
+ pathSuffix cannot match content URIs (opaque paths); code checks
+ OpenableColumns.DISPLAY_NAME instead. -->
<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" />
+ <data android:mimeType="application/octet-stream" />
</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. -->
+ <!-- Share-sheet filters (ACTION_SEND): file URI is in EXTRA_STREAM.
+ Code checks display name for XML and octet-stream variants. -->
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
@@ -90,6 +87,11 @@
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/xml" />
</intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.SEND" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="application/octet-stream" />
+ </intent-filter>
</activity>
</application>
</manifest>