I started a project named "test", I buildet it and I stored data to tinydb, it runs well and now I would save it as new name without losing data, how can I do ?
TinyDB is not for sharing data between applications, it is to be used as a shared location between screens withing same app. Save-As will create new app, so it cann't access data from TinyDB created by other App.
Let me revise, I do created test app and run the call TinyDB1.StoreValue tag and valueToStore, as
Now I copy it using Save As option but I didn't run the call TinyDB1.StoreValue tag and valueToStore
But even I am able to retrive the Test tag values, in screen1.Initialize in copy project. It is copying the entire space concering old app from this _copy is created.
PS: Seems to be Deep Copy but not the Shallow Copy.
I have no problems with companion, only with apk
How apk can include your data produced during devlopement. Following post can be relavent to you if you really want to include sample data as a part of apk destribution.
Built .apk files don't have access to the Companion's TinyDB run time data.
The Companion's TinyDB run time data is shared across all apps while they are being run under the Companion on that device.
To pre-package data into an app, you will need to upload that data into its Media folder, or play with its .apk file's assets folder, much harder.
I don't understand why project name is linked to the tinydb and not the app name.
I solved by saving list as csv, then saving project with new name, reading csv and populating tinydb