Save and retrieve TinyDBX to/from SdCard and CloudDB. Share TinyDBX

Hello friends,

In 2017 I released an old extension to use a TinyDBX, similar to TinyDB.
With this extension we could have different TinyDB through the “Pretag” property, similar to what is now “Namespace”.
Furthermore we could easily save and retrieve TinyDB by saving it in a file in the SdCard.

https://groups.google.com/forum/#!searchin/mitappinventortest/tinyDBX|sort:date/mitappinventortest/7n0CPHIfZSc/BoebXhvYCAAJ

We are going to use that extension to save our TinyDBX in CloudDB and SdCard, then retrieve it.

Note that we will save the entire TinyDBX with a single tag (in this example: mytinydbx).
Notice that I have used Spanish characters: Ñ, ñ, tilde …

p257B_tinydbxCloudDB.aia (17.1 KB)

Here extension:
http://kio4.com/appinventor/257B_extension_tinydb_diferentes.htm

Regards,
Juan A. Villalpando.

2 Likes

Hi your component looks great for what I am trying to achieve regarding saving and retrieving a text file from my database. I have a problem however when trying load the file back to the tinydbx I get an error " Attempt to invoke virtual method 'void java.io.InputStream.close()' on a null object reference" this also occurs on the sample aia file I imported any ideas?

@potocnik
What version of Android are you using?

my Android version is 10.0.0

With Android 10+ it is somewhat more complicated to work with files on the SdCard, try saving the file in the ASD directory.

thank you I will check it out