How do you save data when the user leaves that app with tinyDB?

image
image
When the user clicks the button it should save the number that the label is at

You followed the mood ring tutorial I see from this page
https://appinventor.mit.edu/explore/app-building-guides

Did you complete the tutorial? you have a number of empty sockets.

yes I want to save the number that is on the label when the users clicks the button

Oh I see the tutorial doesn't use a TinyDB :grin:

image
This should work.

The above is for storing the value the other one you could use in your screen initialize block when starting the app. You can make them for every label.

2 Likes

image
I have done that but it wont let me increase the number when i press the images

you are using the blocks at wrong places.
StoreValue block should after "set label.Text to label.Text + 1", and GetValue block should be in Screen.Initialized event.

1 Like

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