Hello, i have B4A for a long time, but i really start to look into it now. So, i am a newbie. I need to download a TXT file from a server (using HTTPUtils2) and fill a ListView with the lines of the TXT. Can you help with some code? Thanks a lot in advance
in the jobDone event you can put something like this - not tested, just a starting point - may be there are more simple ways to do it...:
B4X:
Dim out As OutputStream = File.OpenOutput(File.DirInternal, "test.txt", False)
File.Copy2(Job.GetInputStream, out)
out.Close
Dim l1 As List
l1 = File.ReadList(File.DirInternal, "test.txt")
For i = 0 To l1.size-1
myListview.AddSingleLine(l1.Get(i))
Next