Where’s TinyDB? Extract content TinyDB w extension KIO4_Terminal. Study

Hello friends,

a few days ago I published in the App Inventor Community a small study on the location of the TinyDB “inside” the application when it is installed, for this I used my extension com.KIO4_Terminal.aix

http://kio4.com/appinventor/278_extension_shell.htm

Now I’m going to do the same study in Kodular …

0.- To do this study the application must be INSTALLED .

1.- We create three TinyDB:
TinyDB1 … Namespace: TinyDB1
TinyDB2 … Namespace: TinyDB1
TinyDB3 … Namespace: Tiny_Three

  • TinyDB1 and TinyDB2 are the same database, the same file, because they have the same Namespace: TinyDB1. Both will be the TinyDB1.xml file
  • TinyDB3 is a different database, a different file, because it has a different Namespace: Tiny_Three. The will be the Tiny_Three.xml file
    tinydba7

2.- In our app, in addition to the TinyDB, we will upload the file my_file.txt to the assets.

3.- Using the “AssetsToCacheDir” block, we will copy the file into the Cache directory of the same app and obtain its address:
/data/user/0/io.kodular.juan.get_tinydbK/cache/my_file.txt
We also get:
/data/user/0/io.kodular.juan.get_tinydbK/cache
/data/user/0/io.kodular.juan.get_tinydbK/

4.- When we place TinyDBs, the shared_prefs directory is created with the .xml files corresponding to the TinyDBs

5.- The name of those files is the Namespace , in our case TinyDB1.xml and Tiny_Three.xml

get_tinydbK.aia (12.1 KB)

Regards,
Juan A. Villalpando.
http://kio4.com/appinventor

4 Likes