Skip to content

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

Merged
alexgerardojacinto merged 2 commits intomainfrom
feat/RMET-3767/camera-save-to-gallery
Oct 24, 2024
Merged

feat(camera): only request permission to save to the gallery for Android <= 9#2222
alexgerardojacinto merged 2 commits intomainfrom
feat/RMET-3767/camera-save-to-gallery

Conversation

@alexgerardojacinto
Copy link
Copy Markdown
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
@github-actions
Copy link
Copy Markdown

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, IT-MikeS, ItsChaceD, OS-martacarlos and OS-ricardomoreirasilva and removed request for a team October 24, 2024 15:04
Comment thread camera/android/src/main/java/com/capacitorjs/plugins/camera/CameraPlugin.java Outdated
@alexgerardojacinto alexgerardojacinto merged commit 30da38e into main Oct 24, 2024
@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