diff options
Diffstat (limited to 'android-app/app/src/main/AndroidManifest.xml')
| -rw-r--r-- | android-app/app/src/main/AndroidManifest.xml | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/android-app/app/src/main/AndroidManifest.xml b/android-app/app/src/main/AndroidManifest.xml index a10d503..1701e17 100644 --- a/android-app/app/src/main/AndroidManifest.xml +++ b/android-app/app/src/main/AndroidManifest.xml @@ -3,7 +3,6 @@ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> - <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" /> <uses-permission android:name="android.permission.INTERNET" /> @@ -24,6 +23,15 @@ <service android:name=".LocationService" android:foregroundServiceType="location" /> + <provider + android:name="androidx.core.content.FileProvider" + android:authorities="${applicationId}.fileprovider" + android:exported="false" + android:grantUriPermissions="true"> + <meta-data + android:name="android.support.FILE_PROVIDER_PATHS" + android:resource="@xml/file_paths" /> + </provider> <activity android:name=".MainActivity" android:exported="true" @@ -57,20 +65,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" /> @@ -91,6 +96,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> |
