Github user riknoll commented on the pull request:
https://github.com/apache/cordova-plugin-camera/pull/191#issuecomment-194588633
I guess it does make more sense for us to request the permission before we
select the photo because the developer of a Cordova app doesn't really have a
way to gracefully respond to permission denials after the photo has been
selected.
That being said, we don't actually need the permission to get the photo
because we use an Intent to launch the native gallery app. The reason we
request the permission is because sometimes the stuff we do with the URI we get
back from the native Activity requires us to have permissions. I feel that the
fact that we are using intents means that we should not be requesting
permissions at all. If we have to keep requesting permission to match the
behavior of other platforms, it would be nice if we could be a bit more
granular about it and avoid it when possible. That approach is currently
thwarted by `getRealPath()`, which sometimes requires permissions based on the
type of URI it is passed (which is dependent on the gallery app the user
chooses and thus cannot be predicted beforehand)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]