Bypass authorization for android (this method isn't available?)

This commit is contained in:
Lochlan Wansbrough 2016-01-31 21:05:47 -08:00
parent 5e972a8e0e
commit 8f37727be6
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}