Private Sub scannerStream_NewData (Buffer() As Byte)
Dim sCode As String = BytesToString(Buffer, 0, Buffer.Length, "UTF8")
Log(sCode)
If Main.CurrentActivity <> "" And Not(IsPaused(Main.CurrentActivity)) Then
If SubExists(Main.CurrentActivity, "BarcodeScanned") Then
CallSubDelayed2(Main.CurrentActivity, "BarcodeScanned", sCode)
End If
End If
End Sub