react-native-qrcode-scanner
react-native-qrcode-scanner copied to clipboard
Android focus on tap not working
I'm not able to focus picture on tap. I've tried everything mentioned in docs, still not able to run it. My device is Galaxy Tab A.Help needed
same issue
+1
same here
same issue..taking too long to scan due to the problem in Auto focus
i use a new mobile phone,then it scan quickly...
I am majorly talking about android........ the same qr code is getting easily scanned on other apps but taking too much time for this qr scanner.
I am majorly talking about android........ the same qr code is getting easily scanned on other apps but taking too much time for this qr scanner.
I have noticed the same issue here
I tried it this way and it worked:
const [focusPoints, setFocusPoints] = useState({ x: 0, y: 0 });
const handleDoubleTapToFocus = (points) => {
setFocusPoints({
x: points.x,
y: points.y
});
}
<QRCodeScanner
cameraProps={{
autoFocus: 'on',
onDoubleTap: handleDoubleTapToFocus,
autoFocusPointOfInterest: focusPoints
}}
/>
hope this will help 🙏