Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.5.0, Master
-
None
-
ios
Description
In ios cordova project with barcode scanner plugin, when first time running the app, and call the below method
cordova.plugins.barcodeScanner.scan()
The app will show a dialog to ask user whether allow to use camera or not, if user clicks "Do not allow" button, currently the permission dialog will dismiss, but the scan screen is still opened, and as the app cannot use camera, the user cannot do anything except for clicking the cancel button to cancel the operation.
This is not a user-friend behavior, as when user clicks "Do not allow", the user is already decided to cancel the operation, so the plugin should automatically cancel the scan request, and dismiss the scan screen and also return the cancel result to the cordova callback. There is no reason to still leave the scan screen opened and have to require user to click the cancel button to cancel the operation.