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

Android focus on tap not working

Open ahsan-storm opened this issue 5 years ago • 8 comments

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

ahsan-storm avatar Oct 16 '18 11:10 ahsan-storm

same issue

mohammad1374 avatar Jan 17 '19 10:01 mohammad1374

+1

rcalabro avatar Jun 28 '19 16:06 rcalabro

same here

LiDevil avatar Aug 09 '19 03:08 LiDevil

same issue..taking too long to scan due to the problem in Auto focus

kanikas24 avatar Aug 16 '19 09:08 kanikas24

i use a new mobile phone,then it scan quickly...

LiDevil avatar Aug 16 '19 09:08 LiDevil

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.

kanikas24 avatar Aug 16 '19 09:08 kanikas24

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

isaacjamesdev avatar Nov 22 '20 19:11 isaacjamesdev

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 🙏

SohaibKtb avatar May 25 '21 11:05 SohaibKtb