QRCodeReaderView icon indicating copy to clipboard operation
QRCodeReaderView copied to clipboard

onQRCodeRead method called twice

Open aNnYvIrUs opened this issue 8 years ago • 7 comments

Please check this onQRCodeRead method called twice.

aNnYvIrUs avatar Sep 18 '17 06:09 aNnYvIrUs

I have the same issue, onQRCodeRead method is called twice sometimes even though I called QRCodeReaderView.stopCamera() in onQRCodeRead method.

datnt1987 avatar Sep 26 '17 03:09 datnt1987

It's not a proper solution but temporary i had use boolean in onQRCodeRead method to prevent this. boolean isProcessing = false; //Inside method qrCodeReaderView.stopCamera(); if (!isProcessing) { isProcessing = true; Toast.makeText(activity, "Code==>" + barCode, Toast.LENGTH_SHORT).show(); } and then while you start/resume the camera then make variable false.

aNnYvIrUs avatar Sep 26 '17 05:09 aNnYvIrUs

Dear @aNnYvIrUs , currently that's an worthwhile solution. Thanks so much 👍

datnt1987 avatar Sep 26 '17 07:09 datnt1987

There is an open PR for this, but so far nobody responded to it:

https://github.com/dlazaro66/QRCodeReaderView/pull/120

Rolf-Smit avatar Oct 03 '17 07:10 Rolf-Smit

I think this lib is not maintained anymore

datnt1987 avatar Oct 03 '17 08:10 datnt1987

@datnt1987 @Rolf-Smit sorry for the delayed response. #120 is now merged, I'll release a new version asap. I'll close the issue once the release is out

dlazaro66 avatar Oct 14 '17 11:10 dlazaro66

You can disable QR code decoding once it's read the QR. qrCodeReaderView?.setQRDecodingEnabled(false)

nitink133 avatar Jan 30 '20 05:01 nitink133