App with firebase

So i almost finished the app, the only thing is that i dont know where to put all the variables. Here, i need to go to the next screen when the STATE in waterSTAT turns true.
Is there anyone who can help me please?

will this work when i just put the 'open another screen' in the 'then'? Because there are 2 STATE's one in the soap and one in the water

and how are you changing those tags?

there are sensors connected to the firebase, so if they are triggered, the app will show the next screen

The blocks themself are good, but its just the variables that aren't right i think

And, is that event (DataChanged) triggered in the app when the sensor change the value in FB?

when it is triggered, the app needs to go to another screen

I was asking if when another souce is changing the FB data, in the app, the event is triggered.

Assuming that is working that event, try this:

Change the label by the "open another screen" block.

1 Like

So this will work normally, i only have to change the first argument, but I think i can leave it like this because it is a bool, and are you sure that it will use the right STATE? (see the pic of the FB)

There you are checking the received tag with "true"....what is true/false is the value, not the tag. So, you have to check the tag received is the tag you want (WaterSTAT) and in value will be received the dictionary of that tag, where for the key "STATE" you have the value "true/false".

1 Like

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