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

feat(camera): only request permission to save to the gallery for Android <= 9 #2222

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

alexgerardojacinto
Copy link
Collaborator

@alexgerardojacinto alexgerardojacinto commented Oct 24, 2024

Fixes a bug on @capacitor/camera on Android, where when taking a photo with saveToGallery = true, the camera only opened on the second attempt because of the permission to save to the gallery not being given.

This only happened for Android >= 10, and for those versions, we don't even need to request for permission to save to the gallery. More info here.

Closes #2210

References: https://outsystemsrd.atlassian.net/browse/RMET-3767

…9 (API 28)

Context: For Android >= 10, we don't need to request permissions to save the photo to the gallery. More info here: https://developer.android.com/media/camera/camera-deprecated/photobasics#TaskPath

References: https://outsystemsrd.atlassian.net/browse/RMET-3767
@alexgerardojacinto alexgerardojacinto self-assigned this Oct 24, 2024
Copy link

github-actions bot commented Oct 24, 2024

Released dev build of camera with dev version: 7.0.0-dev-2222-20241024T153427.0

@alexgerardojacinto alexgerardojacinto requested review from a team, ItsChaceD, IT-MikeS, OS-ricardomoreirasilva and OS-martacarlos and removed request for a team October 24, 2024 15:04
@alexgerardojacinto alexgerardojacinto merged commit 30da38e into main Oct 24, 2024
12 checks passed
@alexgerardojacinto alexgerardojacinto deleted the feat/RMET-3767/camera-save-to-gallery branch October 24, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: camera opens after second attempt on Android with using Camera.getPhoto with saveToGallery set to true
3 participants