Description
Not an issue 😄 - I'll handle the PR work but wanted to check how the team thinks this should look/behave.
Currently if the permission to use camera is denied the requestPermissions
method will reject. There are some cases where it would be useful to give the developer control over opening the app system settings.
The barcode scanner plugin takes this approach by providing a property of the options object to handle the flow.
I'd suggest the following be added to the current options for takePicture and wrapping inside an ios
specific object so it's easily readable what this is for.
ios: {
// if true will attempt to open the system settings for the current application
openSettingsIfPermissionWasPreviouslyDenied: boolean;
// string for the confirmation dialog to open the system settings to enable permission
confirmOpeningSettingsMessage: string;
}
If the openSettingsIfPermissionWasPreviouslyDenied === true
then
check confirmOpeningSettingsMessage
for a value. If a value is provided show a confirmation dialog. If no string value for the confirmation, just open the settings.
Thoughts on suggestion or potential improvements?