Merge pull request #13005 from keymanapp/cherrypick/android/remove-media-permissions

fix(android): Remove access to MEDIA storage permissions🍒 🏠
This commit is contained in:
Darcy Wong 2025-01-23 16:59:03 +07:00 • committed by GitHub
commit fe59ccb5d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 15 deletions

View file

@ -7,10 +7,6 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- API 33 and above -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<!-- Devices running up to Android 12L
Starting in API level 33, this permission has no effect:
https://developer.android.com/reference/android/Manifest.permission#READ_EXTERNAL_STORAGE -->

View file

@ -35,8 +35,8 @@ public class CheckPermissions {
checkPermission(activity, Manifest.permission.READ_EXTERNAL_STORAGE);
} else {
// API 33+
//https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions
// Manifest.permission.READ_MEDIA_AUDIO doesn't seem to be needed
// We had to remove these MEDIA permissions from AndroidManifest.xml so these will end up failing
// https://support.google.com/googleplay/android-developer/answer/14115180?hl=en
permissionsOK = permissionsOK && checkPermission(activity, Manifest.permission.READ_MEDIA_IMAGES);
permissionsOK = permissionsOK && checkPermission(activity, Manifest.permission.READ_MEDIA_VIDEO);
}

View file

@ -19,13 +19,7 @@ permission to access storage / "file and media". The screenshot below is from An
### Android 13.0+ Devices
Step 1)
Go to Android Settings.
Due to Google Play Store's "Photo and Video Permissions policy",
Keyman for Android must use a system picker to browse for .kmp files from within the Keyman app.
Step 2)
Depending on your device, click "Apps" and grant Keyman permission to the following:
* Photos and videos --> Always allow all
The screenshot below is from Android 14.0.
![](../android_images/keyman-storage-permission-34b.png)
Follow the steps in [Installing Custom Keyboards/Dictionaries](../basic/installing-custom-packages).