title: android waiting for response from server
body: <p>say I want to perform an Http request from the server, this process takes time.</p>
  
  <p>now because of this, the http request needs to be run on a different thread (AsyncTask, Runnable, etc.)</p>
  
  <p>but sometimes I just need the response when I ask for it, in order to update the UI</p>
  
  <p>using Thread.sleep in a loop to wait for the response is not good performance wise</p>
  
  <p>example: I want the user's name, I ask the server for it, and I have to wait for it
  now the activity calls the UserManager that calls the serverHandler that performs the operation and returns the result back</p>
  
  <p>maybe an event system is in order, but I'm not sure how to do this in my scenerio
  and quite frankly I am really confused on this issue</p>
  
  <p>please help someone?</p>