Hello all,
first, sorry for my english and my low-level knowing of b4a and java...
I'm triyng to write an app for send a data string to a server over tcp-ip. The string is a build of some data getting from gps. I will clean the code after i could run it completely...
The strange thingh is i could send only the first data string, at the second one i receive an error msg like "java.lang.nullpointerexception" at line AStreams.Write (Buffer)
The code where tha app stop is the follow, i dont paste more code because i just copy and paste codes from "Gps" and "testtcp" as i wrote before...
Sub SendData(msg As String)
Dim Buffer() As Byte
Buffer = msg.GetBytes( "UTF8")
AStreams.Write (Buffer)
AStreams.Write(Array As Byte(254))
End Sub
Any suggest is appreciate, really sorry again for my poor knowledge about languages (all kind of...
)
Maurizio.
first, sorry for my english and my low-level knowing of b4a and java...
I'm triyng to write an app for send a data string to a server over tcp-ip. The string is a build of some data getting from gps. I will clean the code after i could run it completely...
The strange thingh is i could send only the first data string, at the second one i receive an error msg like "java.lang.nullpointerexception" at line AStreams.Write (Buffer)
The code where tha app stop is the follow, i dont paste more code because i just copy and paste codes from "Gps" and "testtcp" as i wrote before...
Sub SendData(msg As String)
Dim Buffer() As Byte
Buffer = msg.GetBytes( "UTF8")
AStreams.Write (Buffer)
AStreams.Write(Array As Byte(254))
End Sub
Any suggest is appreciate, really sorry again for my poor knowledge about languages (all kind of...
Maurizio.