ProgressDialog communicate with AsyncTask in android
<p>Tips or ideas on how ProgressDialog can communicate with asyncTask.
For example when I click the button, the program will validate the input to internet, This is should not be interupted. so I use ProgressDialog.</p>

<p>After progressDialog.dismiss(), I need to refresh the view by calling the asyncTask.
I have tried some ways but it's failed, for example 
* I execute asynTask after progressdialog.dismiss().
* put execution asynctask inside dialogbox after progressdialog thread.</p>

<p>in other word, is there any way to tell asynctask that progressdialog has been dismissed. Or is there communication such as message between threads ?</p>

<p>here is the example of my code:</p>

<pre><code>    btnPost.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            stockProgressDialog = ProgressDialog.show(PostActivity.this, 
                    "Please wait...", "Check the post");
            new Thread() {
            public void run() {
            try{
                /* Connect to Internet API */
                    stockProgressDialog.dismiss();
            } catch (Exception e) { }
            // Dismiss the Dialog
            }
            }.start();
            new LookUpTask().execute();
        }
    });
</code></pre>
