Small data save

SpaceCow

Member
Licensed User
Longtime User
Hi,

Is it possible to save a simple configuration file? I just want to save a UUID that requires one line of data. Now i'm using the SQL library and save one line to an databse.

I was wondering if there is a more easy way to do this. It works fine but i'm not sure if this is the correct way.

Thanks!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
There are several simple ways to store text files.
If it is only a single value you can do:
B4X:
   File.WriteString(File.DirInternal, "settings.txt", UUID)
   
   'read the data
   UUID = File.ReadString(File.DirInternal, "settings.txt")

If you have several values then you should use a Map with File.WriteMap / File.ReadMap (in that case I recommend you to check StateManager).
 
Upvote 0
Top