I use Firebase realtime database as a tool to send commands from PC to smartphone
A command is a node like:
COMMMAND: COM = 12345; COL = YELLOW; VAL = ABC
During the activity of the app that receives the commands, everything is fine
When I send a new command from PC to smartphone, the app reacts and executes the sent command
The problem is when I turn on the app
When I turn off and restart the app, the DataChanged event is triggered, even if no command has been sent from the PC
I believe this happens because in the Firebase db the executed commands are not eliminated but remain in memory for debugging purposes
How can I avoid having the DataChanged event every time the app is opened?