Dim d() As String
d = Array As String(BytesReceived)
Log(d.Length)
Hi Mogens, Im in the street right now, but when I arrive in office I send to you a project I doHi Alberto,
Thanks for your answer.
I have tried this
B4X:Dim d() As String d = Array As String(BytesReceived) Log(d.Length)
But i seems to get the same result as I read the BytesReceived string
How do I get the byte into the array right?
Mogens
Sub objEA_ReadData(BytesReceived() As Byte)
SU_Log("[objEA_ReadData]:Size => " & BytesReceived.Length)
Dim bc As ByteConverter
Dim strDataHex As String = bc.HexFromBytes(BytesReceived)
SU_Log("[objEA_ReadData]:Hex:" & strDataHex)
Dim strBytesDec As String
Dim strBytesAsc As String
For a = 0 To BytesReceived.Length-1
strBytesAsc = strBytesAsc & Chr(BytesReceived(a)) & ","
strBytesDec = strBytesDec & BytesReceived(a) & ","
Next
SU_Log("[objEA_ReadData]:BytesDec:" & strBytesDec)
SU_Log("[objEA_ReadData]:BytesAsc:" & strBytesAsc)
End Sub
B4IArray* arr = [B4IArraynew];
arr.bytesData = _readData;
[B4IObjectWrapperraiseEventFromDifferentThread:self :@"_readdata:" :@[arr]];
Sub objEA_ReadData3(DecReceived() As String)
Dim strDec As String
For a = 0 To DecReceived.Length-1
strDec = DecReceived(a)
LogColor("strDec=" & strDec,Colors.Blue)
Next
End Sub
Sub objEA_ReadData2(HexReceived() As String)
Dim strHex As String
For a = 0 To HexReceived.Length-1
strHex = HexReceived(a)
LogColor("strHex=" & strHex,Colors.Blue)
Next
End Sub