title: Synchronization of Progress Dialog in android
body: <p>I have two activities called Client1.java and Client2.java . </p>
  
  <p>Client1 create a tcp/ip connection with a remote host to run a command.Then server will send the output back to Client1.The output will be displayed in Client2 Activity. As some time is needed to send the output back to the Client1 Activity from Remote server I have used a progreesDialog to show some progress until the output is totally send back to Client1 activity from server . </p>
  
  <p>I need some synchronization that is whenever output will be completely send back to Client1 activity progressDialog will be complete and Client2 will be start to show the Output received from remote server. </p>