Android Question Creating a serialised object file and adding to assets folder?

Cyan

Member
Licensed User
Longtime User
Hi all,

I've tried searching for this but I am not sure of the best keywords to use :oops:

I have a text file containing a list of dates along with a small piece of text for each of the dates that I would like to use in my app as a map.

Now, what I'd like to do is to use B4X serialisation (whether it is random access file or B4Xserializator) to create a data file that contains the data from the text file already "encoded" as a B4X map so that I can include it in my assets folder (i.e. via File Manager). I can then read the file from the app and already load it as a map.

Is there any way to achieve this please?

Would using B4J be a good approach since I could then write it to a folder and then just copy the file to my B4A app?

Thank you for any thoughts on this.

PS. I did think about a DB, but I think it's a little bit of overkill for what is essentially a lookup table.
 

drgottjr

Expert
Licensed User
Longtime User
you could also do something similar with b4a: write your file to direxternal and usb-drag it over to your project. you just need permission to write to direxternal. i've done it for the same reason as you.
 
Upvote 0

Cyan

Member
Licensed User
Longtime User
Thank you both, I ended up writing it in B4J as per DonManfred's suggestion and it works perfectly!
 
Upvote 0
Top