I am trying to modify the B4J Chat program to receive integer numbers.
X=s throws the error
B4X:
Sub AStream_NewData (Buffer() As Byte)
Dim s As String = BytesToString(Buffer, 0, Buffer.Length, "UTF8")
Dim x As Int '(any type (Short ... won't work)
LogMessage("You", s)
LogMessage("L=", s.Length)
x=s
End Sub
.java.lang.NumberFormatException: For input string: "0221"