Unfortunately, the library has serious problems after several quick start/stop cycles.
You can test this in the example if you add
Code:
scanner.Stop
btnStart.Enabled = True
btnStop.Enabled = False
to Sub scanner_Detected.
Resulting code:
Code:
Sub scanner_Detected (Codes As List)
Dim sb As StringBuilder
sb.Initialize
sb.Append("Detected code:").Append(CRLF)
For Each code As BarcodeCode In Codes
sb.Append(code.Value).Append(CRLF)
Next
Label1.Text = sb.ToString
scanner.Stop
btnStart.Enabled = True
btnStop.Enabled = False
End Sub
Start the example, scan a QR code, and quickly press start again to scan the next QR code.
After several cycles, the autofocus gets slower, and the screen stays blank or freezes.
I had one occasion where after the scan it displayed the read code correctly as value, but always showed the same wrong image of a previous scan.
I have the same problem in my app: I start the scanner, read a barcode, stop the scanner, process the barcode, start the scanner again to scan the next barcode.
If this is repeated several times, the app freezes.
Any chance to fix this?