Android Question Correct place to store text files that can be read/write

TonyVerberne

Member
Licensed User
Longtime User
Hi,
After checking the B4X docs I can't figure out where to store text files that will be used to populate spinners in my app. The files must be read/write (i.e. modifiable).
I would appreciate any help.
Tony
 

josejad

Expert
Licensed User
Longtime User
Hi Tony:

This is an Erel's suggestion:


This example can be useful too:
 
Upvote 1

aeric

Expert
Licensed User
Longtime User
Instead of text file, I prefer to use keyvaluestore.

 
Upvote 0

TonyVerberne

Member
Licensed User
Longtime User
Thanks Jose. However, I want to incorporate initial versions of some text files into the app when I build it. These should then be accessible to the user and be editable. Imagine a list of plants or flowers. Such a list could be added to by the user. In the past text/data files could be included into the Files folder prior to compilation but these files are not writeable I think. Any further suggestions would be appreciated.

Tony
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
However, I want to incorporate initial versions of some text files into the app when I build it
So, then just copy from dirassets to XUI.DefaultFolder when you open the app for the first time. You can write in XUI.DefaultFolder

If you mean you need the user access with a file explorer to the folder to copy his own files, then check the second link I posted.

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…