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:
[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!
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
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 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
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.
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
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
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?
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.
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. 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.
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.
I meant to say I was informed the app name and package name did not match. Mistake while editing.
WHAT HAPPENED:
I was working with HRMHR_2.aia
I compiled it and saved it as HRMHR.apk
I used HRMHR for 5 months acquiring data.
I came back to grid and began updating using HRMHR.aia and compiling it into HRMHR.apk
I suddenly had 2 HRMHR apps at same time and no data in the new version
@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.