I have an chat app that goes like this :
Activity A ( main screen showing some general stuff)
Activity B ( chat room where user can send and receive messages using a WebSocket. I made websocket global, instantiated/reconnected in B, and singleton, since putting in Service seems to be a problem - not reliable, restarting sometimes where the socket it holds becomes null etc. and needs reinitialized etc.)
Activity C ( user navigates here from B, by clicking on menu. C shows list of participants, owner of the room can kick someone out etc.)
So, when I am in C, I have arrived as A-> B -> C.
When I am in C, I still want B to continue receiving messages, processing them, putting them in messagesadapter etc. That is because, we dont want to lose chat messages ( which are processed in B) while in screen C.
Question - when I am in C, will B functionality keep working ? I want to make sure it works. What do I need to ensure it happens reliably ?