-
Notifications
You must be signed in to change notification settings - Fork 554
Default view based on camera permissions? #99
Comments
+1 |
Seems reasonable. If either of you wants to tackle this, the source is available at https://github.com/card-io/card.io-iOS-source. And if not, I'm sure @dgoldman-ebay will get to it soon enough. |
After iOS 8 introduced camera permissions, we had to make a change (version 3.8.7, 16 Sep 2014) to prevent a crash if the user denied permission. Otherwise we haven't dealt with camera permissions. @drn's above suggestions seem reasonable to me. Although I do have a small nagging concern that when a user is initially presented with the permissions alert, they might reflexively choose Not sure how to deal with that small concern, other than perhaps providing a surrogate camera screen with some text telling them what they're missing and how they could go to the Settings app to fix it. But for users who consciously chose to distrust your app re the camera, that sort of extra screen would just get annoying. Anyhow, I think we should let these suggestions sit here for at least few days to see who else 👍s or 👎s them. |
@drn Satisfying your first request turns out to be pretty easy. (See card-io/card.io-iOS-source@ceb248f if you're curious.)
This turns out to be a bit trickier. It would involve some semi-convoluted code changes, as far as I've been able to think, which doesn't strike me as a good tradeoff. Although, hmm... Well, let me return to this after the weekend. |
@dgoldman-ebay Apologies for the delayed response! Cleaning out my inbox now - must have missed the email when it came in. Thanks for making that code change. I think that it'll be a nicer user experience. The auto-switching based on camera permission choice was a secondary nice-to-have, but not implementing it based on your comments in the code is definitely understandable. Much appreciated! |
Hi All, AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
|
@vijayviswas yes, that code looks quite reasonable - assuming that you don't want to still use card.io in its manual-entry mode. |
thank you @dgoldman-ebay ! |
Hey everyone,
When presenting the CardIOPaymentViewController without camera permissions, the default view is still the camera scanning view. Since camera permissions are denied, an empty gray view is displayed. It would make sense that the default view by default should be the manual input if the AVCaptureDevice authorization status is denied. Could this be implemented?
In addition, when the camera permissions are presented and subsequently denied, it would make sense that the SDK automatically transitioned to the manual input view.
I may be misremembering but I seem to recall with previous versions, the permission-based view switching used to be included in the SDK. Has that changed with more recent versions? In case this helps, we're testing this against iOS 8.2 with the latest CardIO version 5.0.3.
Thanks!
Darren
The text was updated successfully, but these errors were encountered: