TinyDB - Is it possible?

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)
Output

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:

Input

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:
ETinyDBexport

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.

image

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

When I use this the file does not appear anywhere on the phone
TinyExport

Perhaps its saved in a different file location under a different name?
BIG problem is that I need to be able to copy it to the other fone so maybe your extension won't work for me?

See here

That's why I go through the cloud to cross devices.

The Android border guards are fearful.

Thanks. I understand .. but I need to add 2 database together

THE ANSWER TO: Is it possible is a resounding YES

I simply copied the JSON text of both phones, put the JSONs together, stripped all the JSON characters and then read it back into the Data list of the dedicated phone.

:grin: :grin: :grin: :grin: :grin:

PROBLEM: how to move data from one phone to another

What have I learned?

I learned that I had a problem where I had two of my app at the same time! I suddenly could not install my app because it was a clone! Thanks to @Patryk_F and @ChrisWard I was told it was because I had renamed my aia. by hand, on my PC causing the package name to be different from the app name. Thanks to @Anke I then learned that I could open the aia using 7zip, This REVELATION allowed me the tool to repair. SIMPLY rename aia to .7z, go in and correct the package name, save it and rename it back to aia. So SIMPLE.

I learned that saving a file can cause bedlam. The explanation of bedlam is a description of far too many ors and ands as to be unreadable! This in SIMPLE terms means the file can get saved in many places dependant on the OS of the phone and the user saving methods. The SIMPLE solution is to save a file and then search the entire phone (PC) to find out where it is!

I learned that the app data is stored in JSON using TinyDB. Not a surprise. JavaScript was meant to be SIMPLE. It was meant to be easy to read and more human. It is not rocket science to be able to read a JSON dataset. The dataset can be put into a text file and read without the need for elaborate tools.

Solution:
In the end all I needed to do is save the dataset of my existing app on my primary phone, save the dataset on my dedicated phone, put the two together in Notepad on my PC, and then put the data into the dedicated phone and store it with TinyDB. :astonished: SNAP

I learned K.I.S.S.. A repeating theme in my life. Keep It SIMPLE Stupid. Stupid is myself and most things that are huge problems can often be solved in the most simple ways. I believe @Taifun knows this term. I appreciate his approach in his software. Very direct and simple ways of solving things.

A very BIG thank you to all those who attempted to understand me and who taught me so much. To all these kind people I owe a HUGE appreciation.
@ChrisWard @ABG @Taifun @Anke @Kumaraswamy @TimAI2 @Patryk_F

1 Like

Not simple enough: There is no reason at all to rename the AIA to .zip/.7z/.rar.

Unfortunately, I didn't manage to understand what it was really about and especially where the problem was. Exporting TinyDB from an app shouldn't be a problem, nor should importing it back into a new app.


That's why it always helps us all when we receive a simple test app (aia) to understand exactly what it's about and to be able to present a solution using a specific example.

I never wrote that the reason is that you manually renamed the aia file on your PC... the name changes on the ai2 server when you import aia from your PC, and another project with the same name already exists on the server, even in a different directory.

1 Like

I meant to say I was informed the app name and package name did not match. Mistake while editing.

WHAT HAPPENED:

  1. I was working with HRMHR_2.aia
  2. I compiled it and saved it as HRMHR.apk
  3. I used HRMHR for 5 months acquiring data.
  4. I came back to grid and began updating using HRMHR.aia and compiling it into HRMHR.apk
  5. I suddenly had 2 HRMHR apps at same time and no data in the new version :rofl:

@Patryk_F alerted me of the package name being different and the mistake I made was obvious to me. Knowing my error I was able to continue with the mistake and retrieve my data.

Sorry Patryk, the post was very wordy and I edited hastily.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.