Hi,
whilist working on an experiment to send data, via Bluetooth, using the B4RSerializer from B4R to B4A, receiving an error on B4A "Invalid Data" in sub NewData.
Appreciate a hint what could be the cause? Sample project attached.
B4R 1.78 (BETA #2)
B4A 6.5 - with B4RSerializer.bas
whilist working on an experiment to send data, via Bluetooth, using the B4RSerializer from B4R to B4A, receiving an error on B4A "Invalid Data" in sub NewData.
Appreciate a hint what could be the cause? Sample project attached.
B4R 1.78 (BETA #2)
B4X:
' Sending data. DistanceLabel is a String, Distance a Double
astream.Write(ser.ConvertArrayToBytes(Array(DistanceLabel, Distance)))
B4A 6.5 - with B4RSerializer.bas
B4X:
' Class Starter
Private Sub astream_NewData (Buffer() As Byte)
CallSub2(Main, "NewValue", ser.ConvertBytesToArray(Buffer))
End Sub
' Class Main
Public Sub NewValue(data() As Object)
Log("NewValue:"&data.Length)
If data.Length = 0 Then Return
For Each o As Object In data
Log(o)
Next