fix: storage permission request for non-conforming devices #726
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re-opened #645 due to me doing a wrong
rebase
.Fixes #395.
I had the same issue with a news app I've programmed.
These devices run a custom Android OS that does not correctly implement the SAF. The
FileProvider
that is responsible for handling theOPEN_DOCUMENT_TREE
Intent
probably does not set thePERSISTABLE_URI
flag. Thus, the call totakePersistableUriPermission
fails with aSecurityException
; no valid tickets are available.This workaround gets the user passed the onboarding screen. I have tested this using manga I bought online and the default file path of
/Mihon
.I want to note that, after selecting the file path during the onboarding experience, the app would still tell me
No folder has been selected
, but the next button was clickable. I think the issue is that the selected path is the default path, thus the validation logic assumes no (custom) path has been selected.To make this work with @rpr13 's device, one would have to add the model name to the list.