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

Hello friends,

we are going to get the content of the TinyDB using the com.KIO4_Terminal.aix extension that you can find in …

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
    tinydb_Terminal

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/appinventor.ai_juan.get_tinydb/cache/my_file.txt
We also get:
/data/user/0/appinventor.ai_juan.get_tinydb/cache
/data/user/0/appinventor.ai_juan.get_tinydb/

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_tinydb.aia (12.1 KB)

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

3 Likes

??? TinyDB2 should be namespace TinyDB1 ?

Thanks @TIMAI2, edited and corrected.