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

bugfix(camera): use a distinguishable permission denied string for camera and photos #379

Conversation

crixx
Copy link
Contributor

@crixx crixx commented May 7, 2021

Problem

When calling Camera.getPhoto the user is presented with an actionSheet allowing to either choose the camera or use an existing file from photos. Currently, when photos is choosen, and the user does not grant permissions, the returned error says "Unable to access camera, user denied permission request".

Solution

In order to be able to distinguish, which option (camera/photos) was chosen, this PR adds an explicit error string for the case where photos permissions are not granted.

@crixx
Copy link
Contributor Author

crixx commented May 11, 2021

Btw: this harmonizes the behaviour for ios, since in iOS there are already two different strings too.
Infact, we could/should probably use the same strings?

Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the PR, I'll sync the ios/android wording in a separate PR

@jcesarmobile jcesarmobile merged commit c71657f into ionic-team:main May 18, 2021
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.

None yet

2 participants