I need to create an app where I can send written information directly on Firebase to update in real time on the app. I know how to send a label or textbox from the app to firebase, but i want to invert it. Like the example below, i need to write the classroom and the teacher name in Firebase to uptade the label on the app.
If you are adding data directly to the firebase console, the the datachanged event in the Firebase component will not run. You would need to set a clock timer running to check the value of the tag at regular intervals. Just use the getValue block (inside the clock timer event) to fetch the tag, then the gotValue event to set the label with the value.
Yes, see my blocks above. ( I set the timer to 1000ms)
You can start the clock when you initialise the screen. However, you will need to stop the clock before you switch / open other screens.
If it is your intention to have many many classrooms and other data, and to do the same thing, it may be better to fetch the entire projectBucket's data in one call, and handle all the data in the app, extending the timer to 5/10 seconds.
my bad, actually that example is a Value that was get from the app, at first i was thinking if I get the value and try to change it in the firebase console, its gonna change the label too (off course this dont work). I created a new realtime database to test the blocks you gave me, and all I got was... Nothing but a null data
okay now it worked. Thank you my friend, never used firebase before, and sorry for taking your time with the confusion I did with the example, Im just not an experting speaking english to express what I really need