-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restrict duplicate barcode scanning #224
Comments
Do you mean that the qrCodeCallback is being called more than once? I considered limiting that when creating the library, but decided against it as it is very easy to handle that in the code where you're receiving it - you can either call stop as soon as you receive the first barcode or keep a variable with the last received and ignore anything else. If you mean something else could you clarify? |
Thanks for the reply. Yes, I meant the qrCodeCallback. I've handled it by checking against a list with the last scanned items. I was just curious whether the library has an inbuilt option for this. Anyway thanks for your clarification. |
Hi @rmtmckenzie, I have one more query that needs a clarification: When I'm scanning a barcode repeatedly, sometimes it detects correctly sometimes shows different results, it may be off with just one digit if my barcode is an IMEI number with 14 or 15 digits. Is there any way we can control this behavior? |
Unfortunately that's a limitation of the underlying scanning libraries & the camera. Bumping up the resolution might help, but I think it still won't be 100% reliable. Unfortunately that's not something that's super well supported with the easy-to-use code that handles rotation etc at the moment, but you could theoretically use the underlying QrMobileVision class. Also, scanning from another device's screen is always going to be less reliable than from something like paper - the glare + pixels mess with the algorithm, so it might be worth checking on a printed item if that's what you'll be using in practice. If it is going to be digital and if you have any control over the device where the barcode is displayed, I'd recommend seeing if you can use QR codes instead of barcodes as they're much more robust in a digital scanning context, especially with extra error correction turned on. |
here is mine:
and when back to scan screen, just invoke this:
|
Hi,
Thanks for this awesome library. Is there any way to restrict the duplicate barcode scanning inbuilt in this library?
The text was updated successfully, but these errors were encountered: