Storing data offline for later transfer when online

Hi - I am seeking advice on most elegant way to save data on a phone until connectivity is available to upload it to a MySQL database. I have spent some time searching for an answer but with no luck.

I am producing an app that allows one to gather sets of data in the field away from normal Cellular or WiFi connectivity and then upload it to a web site once connectivity is re-established.

At the moment I am going the way of saving the data dets as a .CSV file on the phone but am experiencing the "No permission" problem. After much research it seems that this problem is solvable but might not work for all versions of Android (Past and present)

Is there a more reliable way to accumulate data on the android Phone and then transfer it when connectivity is available?

Use the tinydb

Thanks - In my case each object captured will have something like 45 fields of data and so for each object captured I must add 1 to the tiny DB number and create 45 fields in the new TynyDB. Then when I regain connectivity and transfer the data to the MySQL database parse each TinyDB for its data?

Or is it better to create a .CSV text string in a text box and store the string in the TinyDb and for each new object store the new string in a different TinyDB?

I will try that thanks. I doubt if more than 5 objects will be captured at a time without connectivity so I could do that.

Is it possible to create extra TinyDBs programmatically?
Hope this makes sense.

Create an AI2 list of your items to be stored, add that list to a tinydb tag with a unique name of your choice

Yes, by use of different NameSpaces

Thanks Tim - will come back to if I can't find an explanation of what an AI2 list is after researching it.

Thanks ABG

AI2 lists are linked lists.

Thanks ABG - I will see how all this works - I will start with exporting the data to Google sheets and see how it works and then I am sure i will be back on here with more questions. This will take some time as I spend more time on other hobbies than "coding" - the advantages of being retired!