breautek opened a new pull request, #909: URL: https://github.com/apache/cordova-plugin-camera/pull/909
<!-- Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines: http://cordova.apache.org/contribute/contribute_guidelines.html Thanks! --> ### Platforms affected Android ### Motivation and Context <!-- Why is this change required? What problem does it solve? --> <!-- If it fixes an open issue, please link to the issue here. --> Depends on https://github.com/apache/cordova-plugin-camera/pull/907 Across all API levels that we support, no permissions are necessary for reading from gallery. This is because we use the Media Store and gain temporary access to the content. Across all API levels that we support, no permissions are necessary for capturing an image from the camera. This is because we use an internal app cache directory and we grant the camera app to use this path. Where permissions might be necessary is with the `saveToPhotoAlbum` option. If enabled, non scoped access devices (API 24-28) do require `WRITE_EXTERNAL_STORAGE` to write to the device's gallery. API 29+ with scoped access framework, no permissions are required. This PR allows to be more modern on modern devices, and allows the user to opt into `WRITE_EXTERNAL_STORAGE` by providing the necessary `config.xml` directives, if they plan on using `saveToPhotoAlbum` option. Users that don't want to save to the photo album does not need to declare any extra permissions. ### Description <!-- Describe your changes in detail --> Reworked permission management so that `WRITE_EXTERNAL_STORAGE` is optional. `READ_EXTERNAL_STORAGE` is completely obsolete and has been removed. The `CAMERA` permission workaround is still relevant across all API levels. If declared, the permission must be granted to use the camera intent and that workaround still remains. ### Testing <!-- Please describe in detail how you tested your changes. --> Manual testing on API 28 & 34. Paramedic test passes ### Checklist - [x] I've run the tests to see all new and existing tests pass - [x] I added automated test coverage as appropriate for this change - [x] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`) - [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/)) - [x] I've updated the documentation if necessary -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org