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.