title: Android: Blocking RPC with progress dialog
body: <p>I have an Android App that uses an RPC mechanism to set/get information to/from a server. I call the RPCs from whithin the main thread (blocking) and I want them to be blocking. However, sometimes a call can last for some seconds and I'd like to display an indeterminate progress dialog after some specified time (e.g. 1 second). </p>
  
  <p>I tried to spawn a new thread that makes the call and the main thread waits in a loop (with sleeps) until the call has been finished. Inside this loope I show the progress dialog but this is not working. </p>
  
  <p>Is it possible to show and update the progress dialog inside another Thread or does anybody know a better solution that allows me to use blocking calls?</p>