I am trying to scan a 2D barcode using a Bluetooth scanner and save the output to a variable as in the Async Tutorial using
but ASteam_NewData requires 3 passes to collect all the data. How can I tell when all the data is collected and then pass that value with all the data or wait until the data is collected before processing?
B4X:
mScan = sf.Trim(BytesToString(Buffer, 0, Buffer.Length, "UTF8"))
Log("Received: " & mScan)