react-native-qrcode-scanner
react-native-qrcode-scanner copied to clipboard
Camera preview blacks out after repeated scans
What's happening?
The camera view turns black after repeatedly scanning codes (after about three-four attempts)
How can it be reproduced?
Tried
<QRCodeScanner
onRead={(e) => onSuccess(e)}
reactivate={false}
showMarker={true}
reactivateTimeout={5000}
/>
and
<QRCodeScanner
onRead={(e) => onSuccess(e)}
reactivate={true}
showMarker={true}
/>
Build details?
Android 10 react-native-qrcode-scanner : 1.5.4 RN: 0.63.4
On setting the cameraTimeout
prop to a few milliseconds (10000), the camera times out and the message ''Tap to reactivate camera" pops up on the screen. On clicking the pop-up, the camera preview becomes visible again. Is there any way to programmatically call the cameraTimeout
method? Also, is there a way to add a listener to the function (which will be called when the screen is tapped.) ?