How can i pass my socket object to another activity in android?
I tried to use intent but i doesnt work. Also i tried to create a SocketHandler class with static methods but i dont think this is the best thing to do. Any ideas?
You can use a custom Application class to store that. It is shared across all Activities. Maybe this tutorial helps you: http://www.intertech.com/Blog/androids-application-class/
Nice thank you!
@ReneHollander thanks!
@ReneHollander We need to make socket singleton in application class then we can not emit with different listeners as it will static. We can't emit from multiple activity if we will do then we will receive response in last open activity. share any solution for this case. Thank you