Hi,
i was wanting to know how to prevent the scanner_detected from being called continuously as a stream when a barcode is being detected. if i have the below and scan a barcode, it will call this sub several times.
if i wanted to just add the barcode to a list do i need to stop the scanner for a few seconds and start it again?
i was wanting to know how to prevent the scanner_detected from being called continuously as a stream when a barcode is being detected. if i have the below and scan a barcode, it will call this sub several times.
if i wanted to just add the barcode to a list do i need to stop the scanner for a few seconds and start it again?
B4X:
Sub Scanner_Ready (Success As Boolean)
If Success = True Then
hd.ToastMessageShow("Ready to start", False)
Else
hd.ToastMessageShow("Error starting scanner", True)
End If
End Sub
Sub scanner_Detected (Codes As List)
Dim code As BarcodeCode = Codes.Get(0)
scannedList.Add(code.Value)
Log(scannedList.Size)
End Sub