stp Member Licensed User Longtime User Jun 12, 2016 #1 Is it possible to read a txt file from sd card? Not a random access file. Last edited: Jun 12, 2016
Erel B4X founder Staff member Licensed User Longtime User Jun 13, 2016 #2 You can use sd.Stream.ReadBytes to read data from any file. Upvote 0
stp Member Licensed User Longtime User Jun 20, 2016 #3 Is there any example to read line by line a txt file ? Is it posible to add lines ? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jun 21, 2016 #4 Check this example: https://www.b4x.com/android/forum/threads/sd-cards.65994/#content If the file is not too large then you can read it completely and then use ByteConverter.Split to go over the lines. However I recommend you to use a binary file with fixed records instead. It will make the solution simpler. stp said: Is it posible to add lines ? Click to expand... You can write to SD.Stream to add lines. Upvote 0
Check this example: https://www.b4x.com/android/forum/threads/sd-cards.65994/#content If the file is not too large then you can read it completely and then use ByteConverter.Split to go over the lines. However I recommend you to use a binary file with fixed records instead. It will make the solution simpler. stp said: Is it posible to add lines ? Click to expand... You can write to SD.Stream to add lines.
stp Member Licensed User Longtime User Jun 21, 2016 #5 yes i try to use a random access file to store my configuration Upvote 0