Android Question read lines from txt http

DGAP

New Member
hello guys
I need to do the following:

read the file http blablabla.txt (the file has 3 lines only)
B4X:
0
1.0.0.0
http://...

and use as follows:
B4X:
state = line 1
version = line 2
link = line 3

but do not know how to do: (
I've seen several examples here in the forum but can not apply to what I want...
 

DGAP

New Member
This is a bit more complicated. You need to use HttpUtils2 to first download the file.
Then in JobDone you will need to do something like:
B4X:
Dim tr As TextReader
tr.Initialize(Job.GetInputStream)
Dim lines As List = tr.ReadList
tr.Close
Can you give me an example? thx
 
Upvote 0
Top