Notifications with Firebase when Data changed

I found the solution, I just have a problem when I’m on a screen other than the one where the value arrives. When the data changes on the screen message and I am on another screen, the message does not appear. It only appears if I am on the screen at the time the data changes. How?

You have no “else” in your if statement…look at my blocks again

A post was split to a new topic: I need help with Firebase Data Changes