-
Notifications
You must be signed in to change notification settings - Fork 2
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]: hide additional permission dialog on Android for file access when not needed #24
Comments
Hi, On Android 14 a new permission is required to read media. See https://developer.android.com/about/versions/14/changes/partial-photo-video-access It is just a wild guess but Also, we can't directly use |
Both permissions are included in the manifest. The weird thing is that it doesn't matter which option is selected in the permission dialog which is triggered by the call to Would it be an option to make the call to the permission dialog optional, so that we can pass in a bool indicating we already retrieved permission to access the file and there is no need to ask for it again? The current flow is not very user friendly so it'd be great if this can be improved. |
According to
I don't understand why I don't remember having the same issue in the example app and we are using |
I just tested with the example app and it basically has the same issue.
Few things can happen:
Can we make the permission check optional? That'd prevent this issue and make user flow much better. |
Oh sorry, I understood you got the permission request twice but that's not that. |
Correct, I want a way to prevent it popping up when it's not needed. |
Oh, the file picker grants a temporary access to the file. I did not know. Indeed there should be a way to NOT request the permission (starting from Android 13). Maybe there is some way to check that we have access to the file, that. would make a simpler API. |
Version
1.3.0
Environment that reproduces the issue
Is it reproducible in the example application?
Not tested
Reproduction steps
Expected result
When uploading a video an additional permission dialog is displayed on Android. However, in our use case we use ImagePicker for the user to select a file, so we don't need to ask for permission again.
Can we pass a direct link to the selected
XFile
orFile
instead of the path as string to prevent this?Upload video without additional file permission request (already done by
ImagePicker().pickVideo(...)
).Actual result
An additional permission request is displayed upon the call to
uploadWithUploadToken
which doesn't serve any function.Additional context
Android 14 and higher.
Relevant logs output
No response
The text was updated successfully, but these errors were encountered: