Open keithoys opened 5 years ago
add this
<QRCodeScanner
...
cameraProps={{
androidCameraPermissionOptions: null
}}
/>
Same problem here. any solution for this problem?
I am using the react-native-camera
version 3.8.0 and everything is working.
Version of react-native
is 0.61.2.
const { height, width } = Dimensions.get('window');
<Camera
style={{ height: height, width: width }}
onBarCodeRead={(e) => console.log(e.data)}
androidCameraPermissionOptions={null}
pendingAuthorizationView={<My View behind the dialog that is asking for permission />}
notAuthorizedView={<My View that shows that user declined permission />}
>
</Camera>
<QRCodeScanner cameraProps={{ androidCameraPermissionOptions: null }} onRead={this.onSuccess} ref={(node) => { this.scanner = node; }} />
Its working fine. thanks @songoten28
What's happening?
When camera permission is not granted for the app, this long white rectangle pop-up will always appear first. User has to click anywhere outside of the rectangle pop-up before the native Android pop-up comes up to request for camera permission.
This is all I did in render:
Build details?
Android 9.0, react-native-qrcode-scanner 1.2.1