keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
367 stars 102 forks source link

fix(android/app): Update storage permissions for Android 12.0+ #11299

Closed darcywong00 closed 1 week ago

darcywong00 commented 1 week ago

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

For Android API 33+

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

keymanapp-test-bot[bot] commented 1 week ago

User Test Results

Test specification and instructions

Test Artifacts

darcywong00 commented 1 week ago

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.

bharanidharanj commented 1 week ago

Test Results

..error message

..Grant Storage permission help

..Allow Access

..Installed sil_ipa keyboard

bharanidharanj commented 1 week ago

Test Results

keyman-server commented 1 week ago

Changes in this pull request will be available for download in Keyman version 17.0.314-beta