my app has two activity. 1. To show the names of all the user connected to the server in a recyler view. 2. On clicking a name, a new activity is created which will be there to show and have a private chat with the user.
I am using Nodejs as server and Socketio. I want the socket.emit() and socket.on() in android to work in background and can be used for all the activities. i.e I do not want to call socket.connect() each time the activity changes. Is there a way to do it?