How to put Firebase data into a variable when starting App Inventor

If I run the app similar to the picture above, I want to put the value in my database in the global variable, how should I do it?

My app wants to show the on/off status of the button on the web and app in real time.
I want to keep the app intact even if I close it, but I don't know how to reset it.

The picture below is the blocks I made.

@mongsoon I didn't got this line

1 Like

It's...
This means setting the variable state the same as before when you shut down and run the app again.

do you want to set variable or the TinyDB1 like that?

sorry. I'm not good at English. I want to set variable Firebase database like tinyDB picture

1 Like
This code is with TinyDB
This Code is with FirebaseDB

If you found this helpful then mark it as solution.

2 Likes

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