The surface which our customer scans for barcodes using ZXing has multiple barcodes. ZXing is really fast finding barcodes, which makes it a common mistake that the wrong barcode is scanned. So we figured out a solution: Let's add a trigger-button to the scanning process. The user sees the viewfinder and can aim at the barcode, and presses a button whenever they have aimed at the right barcode. Now this is working quite well. However; you have to be quick by finding your barcode because after a while, ZXing will not detect the barcode anymore. The yellow dots will stop to appear.
Why is this?
What we've done, is that we have added a "shoot" boolean to CaptureActivity. When we enter the handleDecode method, we check if "shoot" is false. If so, we exit handleDecode without any further processing.
There's probably a better way to do this, what do you think?