i've used the handler approach, and it gets really, really ugly. i have this huge switch statement covering all the possible messages. it's so ugly it made me think i must be doing something wrong.

On 9/21/09 10:26 AM, Mark Murphy wrote:
  
could on also use a dedicated broadcast receiver? for example, the
activity registers a BR that has a handle to the activity itself. the
client then sendBroadcasts() to the BR?
    
Yes, but that would be a lot more overhead and a lot more public. Intents
are broadcast to the device as a whole, not just within your application.

Ordinarily, I would have suggested AsyncTask, but I believe the threading
model the OP needs for the ServerSocket will not work well with the
AsyncTask framework.

  

--

Reply via email to