I'm working with Socket, using Socket.io Android Library & it's implemented well and working successfully. It's done, But it's in only single activity.
Now I want socket implementation in the entire application. Something more reliable and easy. I need socket listeners and methods to emit and receive in a single place so don't have to write everywhere.
I want a class where I can put all socket code and access it from anywhere and listen to that class all the time & pass an event to other Activities or Fragment if I receive anything in a socket.
What should be a good solution for this?
Thanks
Aucun commentaire:
Enregistrer un commentaire