Closed darcywong00 closed 1 week ago
Test specification and instructions
Can we not request permission to access the files at the time it is needed? I've certainly seen that before. I would expect:
I think on older versions of Android, it used to prompt for the permission when the file is accessed. That seems to have changed over the years.
..error message
..Grant Storage permission help
..Allow Access
..Installed sil_ipa keyboard
Changes in this pull request will be available for download in Keyman version 17.0.314-beta
Fixes #10659 and follows the permission refactoring from #10904
Reference https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions
This updates CheckPermissions to ask for the corresponding storage permissions needed to install local kmp files.
For Android API 30-32
Manifest.permission.READ_EXTERNAL_STORAGE
For Android API 33+
Manifest.permission.READ_MEDIA_IMAGES
andManifest.permissions.READ_MEDIA_VIDEO
. (I tested withoutREAD_MEDIA_AUDIO
and it seemed to worked)Note: For these devices, the user needs to still manually grant these permissions from Android Settings before Keyman can access local .kmp files. This is documented in the updated help page: grant-storage-permission.md
User Testing
Setup - Install the PR build of Keyman for Android on the corresponding Android device/emulator (API number in the test name) Also, from Chrome, download a local copy of sil_ipa.kmp
TEST_API_31 - Verifies Keyman can access local kmp file on Android API 31
TEST_API_34 - Verifies Keyman can access local kmp file on Android API 34