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): Return if image was saved to gallery #599

Merged
merged 3 commits into from
Sep 9, 2021
Merged

Conversation

jcesarmobile
Copy link
Member

At the moment on iOS, if the user doesn't grant the gallery permission, we return the image even if it fails to save it to the gallery.
On Android, if the user doesn't grant the gallery permission in enters in an infinite loop of requesting the permission.

This PR unify the behaviour so on Android it returns the image even if it failed to save to to the gallery and prevents the infinite loop.

Additionally, on the returned object, it adds a saved property that will tell the user if the image was saved to the gallery or not.

closes #593

@jcesarmobile jcesarmobile changed the title feat(camera): Return if camera was saved to gallery feat(camera): Return if image was saved to gallery Sep 8, 2021
@jcesarmobile jcesarmobile merged commit 594af3b into main Sep 9, 2021
@jcesarmobile jcesarmobile deleted the return-saved branch September 9, 2021 09:47
carlpoole added a commit that referenced this pull request Sep 15, 2021
* fix(camera): set settings again on callbacks (#595)

* feat(storage): Add removeOld function (#585)

* feat(camera): Return if image was saved to gallery (#599)

* fix(camera): saveToGallery for edited images (#602)

* docs(camera): Add descriptions to CameraSource (#608)

* fix(local-notifications): return schedule on as object (#603)

* chore(release): publish [skip ci]

 - @capacitor/camera@1.1.0
 - @capacitor/local-notifications@1.0.6
 - @capacitor/storage@1.2.0

Co-authored-by: jcesarmobile <jcesarmobile@gmail.com>
Co-authored-by: Ely Lucas <ely@meta-tek.net>
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(CameraPlugin, Android) - endless loop when photo permission is denied with saveToGallery option
2 participants