2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-22 09:58:08 +00:00

Fix access to the Downloads directory on Android 10

On Android 10 the share files feature fails when the default
directory is selected. When selecting a custom directory, the
permission is explicitly asked to the user, which makes the
feature work. When the location is switched back to the default
location, the feature is again broken.

The requestLegacyExternalStorage flag brings back the old
behavior and allows to write in the directory. It should be however
ignored for Android >= 11 according to the docs:

https://developer.android.com/training/data-storage/use-cases#opt-out-in-production-app

From Android 11, the Downlods directory should not need specific permissions.
This commit is contained in:
Luca Carlon 2024-10-02 04:41:39 +00:00 committed by Albert Vaca Cintora
parent bb8649d869
commit 38e713f489

View File

@ -68,7 +68,9 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/KdeConnectTheme.NoActionBar"
android:name="org.kde.kdeconnect.KdeConnect"
android:enableOnBackInvokedCallback="true">
android:enableOnBackInvokedCallback="true"
android:requestLegacyExternalStorage="true"> <!-- requestLegacyExternalStorage is only used in Android 10: https://developer.android.com/training/data-storage/use-cases#opt-out-in-production-app -->
<receiver
android:name="com.android.mms.transaction.PushReceiver"