Good day to all of you, i want to ask about this outcome of this coding
i took this code from usb serial and i modify it, but why the label2.text is giving "[Ljava.lang.String;@216abcd8 " answer.And give a warning " Object converted to string. This is probably a programming mistake"
And also i try to change it to this new version of code
but it gave me this error
I have try all the related things that I found in the forum but doesnt have any outcome
B4X:
Sub Astreams_NewData (buffer() As Byte)
msg = conv.HexFromBytes(buffer)
msg2 = Regex.Split("FE1C",msg)
label1.Text = msg
label2.Text = msg2
End Sub
i took this code from usb serial and i modify it, but why the label2.text is giving "[Ljava.lang.String;@216abcd8 " answer.And give a warning " Object converted to string. This is probably a programming mistake"
And also i try to change it to this new version of code
B4X:
Sub Astreams_NewData (buffer() As Byte)
msg = conv.HexFromBytes(buffer)
msg2 = Regex.Split("FE1C",msg)
Dim msg3 As String
Dim List1 As List
List1.Initialize
For Each row() As String In msg2
List1.Add(row(0))
Next
label1.Text = msg
label2.Text = List1
End Sub
but it gave me this error
For Each row() As String In msg2
javac 1.6.0_26
src\b4a\example1\main.java:350: incompatible types
found : java.lang.String
required: anywheresoftware.b4a.BA.IterableList
final anywheresoftware.b4a.BA.IterableList group59 = mostCurrent._msg2;
I have try all the related things that I found in the forum but doesnt have any outcome