-
Notifications
You must be signed in to change notification settings - Fork 596
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
feat(camera): Support for Samsung Gallery app on pickImages #706
feat(camera): Support for Samsung Gallery app on pickImages #706
Conversation
I am testing this on my Samsung Galaxy 9+ on Android 10 and the picker that shows encounters similar issues to the issue. Single-tapping an item causes the picker to disappear and go back to the app with an error. I can long-press items to multi-select but it isn't super obvious. If I select a different app in "Browse files in other apps" such as the Gallery, it has the same issue as the picker did before when selecting the native Gallery app. |
29422f2
to
1f70346
Compare
Yes, you're right @carlpoole. I made a change on multi-select method to avoid the error "No image picked" if only one picture is selected. It's works fine on a OnePlus with Android 9. For Samsung devices, I add a extra args on intent (multi-pick) and pictures are in data.getExtras(). But is required to check permission to acces on external storage, I add a call on web part to request permission with photo argument. (I think is maybe possible to request permission directly in java part) |
1f70346
to
4786a3f
Compare
Thanks for the update, I tested this again and it seems to be working great now. On my device it is asking which gallery app to use and if I pick the Samsung gallery app, I have the option of selecting multiple and returning or just choosing one. I checked what you mentioned about permissions being necessary for external storage but if I try to pick an image off an SD card it seemed to work fine without requesting permissions. Were you testing that on a specific version of Android/Samsung gallery app? |
Good news ! |
I think it's related to the Android version. It seems to work fine for Android 10+ but so far my test on Android 9 and below I do get a crash for missing External permission. |
It's maybe specific behaviour with android version and samsung device. (No problem with that on OnePlus / Android 9) if(Build.VERSION.SDK_INT <= 9.0 && Build.BRAND.equals("Samsung")) { Or maybe just add checkpermission in the web part. |
I've added permission prompt/check, but will continue with the image picking even if denied, in that case it will catch the security exception in devices that require the permissions and reject, or return the images in devices that don't require the permissions |
Hello,
Fix to correct issue with multiple image selection on samsung devices (#704)
closes #704