Android Question Write and read a txt file

Giusy

Active Member
Licensed User
Hi,
I read a txt file so:
B4X:
tr.Initialize(File.OpenInput(File.DirInternal, "PARAMETRI.txt"))  
        ROWs=16
        For SS = 1 To ROWs
        strlines = tr.ReadLine
        ....
        Next 
        tr.Close
But I do not Know how to write a file
B4X:
tr.Initialize(File.OpenOutput(File.DirInternal, "PARAMETRI.txt",False)) 
???

Can someone help me?
 

MarkusR

Well-Known Member
Licensed User
Longtime User
if u write the count of lines before its easier to read.
u can also save/load a map (key/value) with File.
 
Upvote 0
Top