What is TinyDB Namespace?

Hi all. :smiley:

Looked all over, cannot find an actual definition of TinyDB Namespace. :unamused: What is it used for primarily?

Also, I’m using different TinyDB names for different screens. Is this necessary if I change the namespace for each screen?

As always, any help is greatly appreciated! :grin:

See here:
image

No, by default , all of your TinyDB values are getting stored in TinyDB1 nameSpace, you can always change the name of the name space you want your data to be stored at ( if this name space doesn’t exist , a new one would be created :wink:) , by changing the nameSpace property, changing the name Space property, would make you read and write data from this nameSpace only.It makes it easier to organize your tags and values.

3 Likes

So if I use the same TinyDB1 in each screen, but change the namespace name, then these are now different tags in different TinyDB1 databases? E.g.,

TinyDB1 Namespace Screen1 tag Sacramento
TinyDB1 Namespace Screen2 tag Sacramento

Do both namespaces get removed when the app is uninstalled?

Yes.

Yes, all of your TinyDB data , got removed when uninstalling your app ,but not when updating

Thanks for your help, the docs are less than totally informative. :confounded:

I’ve been having problems with an app that was installed and tested with Companion, then installed via Google Play and then a new version via Google Play. I uninstalled each version and even had GP uninstall their version, but when I open the app, the phone keeps thinking that this is NOT the first run. I’ve tried to remove all TinyDB tags, but it hasn’t been totally successful.

As the companion and your app are two different apps, so their tiny databases would be different.

Uninstalling, or even just clearing the app’s data should remove your app’s tiny db data, however, in some cases( if it was enabled ) google drive backs up your app data, so it doesn’t get lost, when you reinstall it, you will find the data as it was before uninstalling.

yes, as @Mohamed_Tamer already mentioned, see also

Taifun

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.