Number of times entering a screen without use of TinyDB

Set a counter variable +1each time you switch to the second screen. Use the start value to transfer the variable. Count will be lost when you close the app.

1 Like

may i know why?

Hi,I think, if it is possible to run a program without taking a permanent space from the memory to store a variable, it is better to use a space to store a permanent variable.

Hi thanks.

Hi thanks

Hi ,thanks

How are you storing your data?

In vacuum tubes?

1 Like

What do you mean?
What I mean is that if we store the variable temporarily, it will not take up memory space when the program is closed, but if we save it in the form of a TinyDB, it will take up space in memory even when the program is closed.

How tiny is your available memory that you need to save maybe 10 bytes?

Ok.thats right.

How can I check the tinydb size of my app ?

in fact TinyDB store value in a xml file, located at /data/data/{package_name}/{namespace}.xml. (correct me if i am wrong )
you can see it if your phone is rooted.

Internal Storage, but (not /data/data/...) - PrivateDir:

1 Like

If you don't want to keep the information when you close the application, simply use the "ClearAll" block to Clear the contents of the TinyDB before closing the application.
In the marked solution, when closing the app the content of the screenSwitchCount variable is lost, if "ClearAll" the TinyDB will also delete its content and perform the same effect.

1 Like

Hi:that,s right.

I checked it now:


So the path (in the Internal Storage) is:


1 Like


1 Like

Copied to /Download/...


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