saumitrabhave / qr-zbar-ane

ANE for QR Code Reader
MIT License
84 stars 23 forks source link

No way to determine whether user has granted camera access (ios) #53

Closed harry248 closed 9 years ago

harry248 commented 9 years ago

When the user denied the access to the camera (on ios) I would like to show an alert. However the extension does no offer a method to check the access state.

saumitrabhave commented 9 years ago

Is this bug regarding https://bugbase.adobe.com/index.cfm?event=bug&id=3837401 ? Looks like a general AIR issue... Let me see if I can quickly add some code in ANE to surface this info.

harry248 commented 9 years ago

Would be nice if you add a little check. Seems possible, see http://stackoverflow.com/questions/20464631/detect-permission-of-camera-on-ios

saumitrabhave commented 9 years ago

Will take this up.

harry248 commented 9 years ago

Great! Thanks!

saumitrabhave commented 9 years ago

Fix has been done in startPreview method, it will ask for camera authorisation(if not asked already) and use the authorisation response in deciding whether to launch the camera preview or not.

startPreview can return false on iOS, if, the preview is already in progress OR the End User declined the Camera Access to application.