Best practice for pass info from Service to Activity (or Fragment)
问题 I am running a Socket.IO client on my Android app and I am having trouble passing data from the Service (that handles the connection of the socket) to one of the Fragments . In one of my Activities , I open up a fragment that has a profile page. When the profile fragment opens, I emit an event to the server asking for the profile information. I am getting the information back from the server with no problems, but I am having trouble sending that data (a JSON string) to the current fragment.