Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(android/engine): Storage permission denied on Android 14.0+ #10659

Closed
darcywong00 opened this issue Feb 7, 2024 · 6 comments · Fixed by #11299
Closed

bug(android/engine): Storage permission denied on Android 14.0+ #10659

darcywong00 opened this issue Feb 7, 2024 · 6 comments · Fixed by #11299

Comments

@darcywong00
Copy link
Contributor

darcywong00 commented Feb 7, 2024

          Trying to install from Chrome Downloads, I get a toast from Keyman: "storage request permission was denied. May fail to install key..." 

Originally posted by @mcdurdin in #10133 (comment)

Also noticed in the user testing setup on #10624

Steps to repro

  1. On an Android 14.0+ device, download a kmp file in Chrome
  2. Go to Chrome --> Downloads
  3. Attempt to install the kmp file
  4. Observe the toast error

See if these SO threads works

https://stackoverflow.com/questions/77386225/manifest-permission-manage-external-storage-does-not-work-on-android-14

https://stackoverflow.com/questions/72948052/android-13-read-external-storage-permission-still-usable

@darcywong00
Copy link
Contributor Author

As a workaround, the kmp can still be installed from the Keyman for Android app as "Install from local file"

@mcdurdin mcdurdin modified the milestones: B17S1, B17S2 Feb 17, 2024
@darcywong00
Copy link
Contributor Author

Other Android developer references
data-storage
manage-all-files

@darcywong00
Copy link
Contributor Author

More notes:
Google recommends using getExternalFilesDir() to access app-specific files from external storage

https://developer.android.com/training/data-storage/app-specific#external-access-files

@mcdurdin mcdurdin modified the milestones: B17S2, B17S3 Mar 3, 2024
@darcywong00 darcywong00 modified the milestones: B17S3, B17S4 Mar 16, 2024
@mcdurdin mcdurdin modified the milestones: B17S4, B17S5 Mar 30, 2024
@darcywong00 darcywong00 modified the milestones: B17S5, B17S6 Apr 12, 2024
@darcywong00
Copy link
Contributor Author

The links on SO don't look promising.
https://stackoverflow.com/a/78065341

The general consensus is that apps can access files they create. And then use Intent.ACTION_OPEN_DOCUMENT to browse to open specific files (which we already do for "Install from local file").

@darcywong00
Copy link
Contributor Author

Workaround for enabling permission on Android 12.0 (API 31)

Device Settings --> Apps --> Keyman --> files and media --> Allow access to media only

@darcywong00
Copy link
Contributor Author

Fixed by #11299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants