From 8f37727be69132cdbfed95255c8bd010a1db5c7d Mon Sep 17 00:00:00 2001 From: Lochlan Wansbrough Date: Sun, 31 Jan 2016 21:05:47 -0800 Subject: [PATCH] Bypass authorization for android (this method isn't available?) --- Camera.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Camera.js b/Camera.js index bb37ee6..6ee4c6c 100644 --- a/Camera.js +++ b/Camera.js @@ -111,8 +111,10 @@ export default class Camera extends Component { } async componentWillMount() { - const isAuthorized = await CameraManager.checkDeviceAuthorizationStatus(); - this.setState({ isAuthorized }); + if (Camera.checkDeviceAuthorizationStatus) { + const isAuthorized = await Camera.checkDeviceAuthorizationStatus(); + this.setState({ isAuthorized }); + } this.cameraBarCodeReadListener = NativeAppEventEmitter.addListener('CameraBarCodeRead', this.props.onBarCodeRead); }