Android listen for messages from server socket
问题 I am trying to create an android app that communicates with a local server through a socket. The communication passes simple commands and data in strings using JSON. The client should constantly listen to incoming messages from the server and update the user interface when new data is received. So i have created a network service which is a bound service running in the background. From my activity i bind to the service and receives an instance of the service object. The service object