react-native-qrcode-scanner icon indicating copy to clipboard operation
react-native-qrcode-scanner copied to clipboard

Camera preview blacks out after repeated scans

Open Balthazar33 opened this issue 3 years ago • 1 comments

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

Balthazar33 avatar Apr 15 '21 09:04 Balthazar33

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.) ?

Balthazar33 avatar Apr 16 '21 06:04 Balthazar33