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

Is it possible to only scan a small area within the camera view

Open YHYbetterlife opened this issue 6 years ago • 6 comments

It's normal to have a frame to scan the QR code. And I'd like to only scan QR code within that fram. Is it possible to only scan a small area within the camera view?

What's happening?

screen shot 2019-01-05 at 11 43 32 pm For example, I only want QR code within that sky blue frame to be scanned. How can I do this?

How can it be reproduced?

Build details?

YHYbetterlife avatar Jan 06 '19 04:01 YHYbetterlife

It's not the cleanest solution but I'm using the onLayout function on the frame View and comparing the positions whenever it reads a code. Works well enough but I'm not terribly sure how accurate it is.

gangwarily avatar Mar 28 '19 21:03 gangwarily

@gangwarily For the IOS QRCode Scanner, it's work perfectly with using your suggested solution. But Android this part, i found that the json data is not same as iOS, Android always return the same width and height(i guess it is camera view width and height?). Also the size of origin array sometimes is different and don't know each items are represent to which xy or corner.

Iamivan1996 avatar May 20 '19 09:05 Iamivan1996

any update for this?

naugo-naugo avatar Apr 15 '20 09:04 naugo-naugo

any update?

nrlnv avatar Oct 20 '20 08:10 nrlnv

any update?

yeongjunekoh avatar Jan 10 '22 02:01 yeongjunekoh

https://github.com/moaazsidat/react-native-qrcode-scanner/issues/373 see this issue

TT191 avatar Feb 11 '22 09:02 TT191