TinyDB - Is it possible?

I want to be able to capture my string data and put it in a file
then from another app take it in
If it is in a file, I am hoping it can be copied to another fone also

The data stored in a tinydb is output in JSON format, you do not have to store in the tinydb as JSON.

Sorry... I thought JSON was script / I am not understanding

What is JSON

That is what I thought (my javascript is very rusty nowadays :rofl:)

So does this mean my string data will not work with it?

Might be best if you test it and see what happens....

Thanks Tim ... yes I will ... was just hoping for a lead :astonished:
I have read several posts where people have wanted to do it ... :thinking: .. just maybe

This might help you to see what happens:

If you wipe the namespace you can then restore the data with LoadJSON

The JSON data you get out of the namespace is the storage format for all your data, really only designed for backup and restoring to a tinydb, but you could extract all the data from the JSON if you wished.....

1 Like

Appreciate it so much. For me, I need to move my app to a dedicated phone so moving the data is important. There is also the situation for everyone that one day the phone will die and data is important.

Since the recent big change in BLE due to Android 13 OS, I found I had to make vast changes. This is when I decided to dedicate one phone to my WorkOut app and to Android 11 forever. I use this phone 30 minutes a day, turning it off after each use, and it is not connected to the internet.

The problem then occurs of how to move my data to the dedicated phone.

I posted yet another TinyDB export/import sample at

for file-o-phobes.

1 Like

I see and understand but data is data right? :thinking:

My crazy idea:
First I output the Data from TinyDB to a TextBox. Then copy it to the clipboard (also can use Taifun's clipboard extension to do this automatically)

I can then store it in a file using SimpleText app on the phone.

Then I use the PC to transfer the text to the receiving phone SimpleText app. On the receiving phone I simply paste the text data into a TextBox and save it to Data:


Tell me if this is not possible?

Data must be in the right format according to its type.

Copying list data into a Text Box.Text without reformatting it to make it reconstitutable at the other end of a transfer scrambles it.

JSON was designed for this.

The Web component has a block to rebuild dictionaries and tables from JSON text.

1 Like

[quote="ABG, post:33, topic:105019"]
The Web component has a block to rebuild dictionaries and tables from JSON text[/quote]

Is there an example of this that I can read? OOOPS... sorry .. your meaning when saving to the cloud? I have TWO data sets because of this forced split so I need to put the two datasets together

To be honest:
I thought it would be "scrambled" and I figured on having to write a descrambler routine UG! I only have 18 days left before going off-grid for 3 months UG!

You can merge two tables (lists of lists) with the same columnar structure by using the list append block.

To learn more about JSON and dictionaries, see

1 Like

Although I like your idea of using the cloud, I only need to do this one time. It would take me some time to learn the cloud and I only have a few days left.

I trapped the dataset and on the PC I wrote an executable to massage the text back into their original strings. Only takes a few minutes to write the .exe

For now the strings are terminated in ascii 13+10 for a text file.
Next step is to add the two datasets together and input them into the other phone

JavaScript was meant to be easily understood :wink:

What's stopping you from using the solution described above by Tim?

ETinyDB will output the entire TinyDB data of the application into a string which you copy and load back into another application using ETinyDB itself.

I guess I don't entirely understand it.

I do not need or want to move all TinyDB namespaces. This would produce bad things. :astonished:

I only want and need to copy one namespace called "Data"

How will it enable me to move it to a different phone?
I just don't follow the logic :thinking:

I cannot get this to work:

I am having great difficulty using the extension but I believe it will do as I need. I simply don't understand it. The blocks do not have any explanation :thinking:
Ideally, I would like to create a dedicated folder and put the JSON file in it but I cannot seem to get it to save to a file so I am dead in the water.


Just simply use this block and put your namespace there, you'll get your exported data of the namespace.

OHHHHHHH !!!! :astonished:

OK I am a dummy! I have been reading so much today in search of understanding FileSaveFile and finally I got smart enough to do a search of the phone using the PC :upside_down_face: :frowning_face:
Now I understand the meaning of what I read.

When I use ETiny I cannot find the file. I need to be able to find the file to be able to copy it from Phon1 - PC - Phone2