When the chat wiev application is closed, the message does not show, it resets, firebase also exits, why should we do it?

When the chat wiev application is closed, the message does not show, it resets, firebase also exits, why should we do it?

Duplicate of Chat wiev does not show a message when the application is closed