How to send text files as part of app

DrWave

Member
Licensed User
Longtime User
Hi all, especially Erel. I have been learning b4a and so far have got many things to work. My application requires 2 CSV textfiles (UTP-8 coded) for lookup. How can I upload these along with the b4a program from the PC at compile/install time ? I am using the B4A-Bridge successfully to install the program itself.

BTW - b4a - best app I've bought so far !
 

joseluis

Active Member
Licensed User
Longtime User
Everything you put under the Files folder gets included in the apk, under DirAssets. You can access it like this:

TextFile = File.ReadList(File.DirAssets, "mytextfile.txt")
 
Upvote 0

boastrike

Member
Licensed User
Longtime User
You can add the text files by selecting the "Files" folder in the lower right of your IDE screen and choose "Add Files". Then you can access them as joseluis showed you.
 
Upvote 0

joseluis

Active Member
Licensed User
Longtime User
I just want to clarify that it is NOT necessary to add them into the IDE in order to access them as I said before.
 
Upvote 0
Top