Async Task Can it partially run?
<p>It is definitely working as postData sends to my site and forwards an email which it is doing. But loadingDialog does not execute ( it may be but it is a very quick process). The last process sentdialog is not executing as it brings up a new dialog saying sent and is not happening.
I have this script for the async</p>

<pre><code>    protected class sendReport extends AsyncTask&lt;Void, Void, Void&gt; {
    protected void onProgressUpdate()  {
         progressdialog();
    }
    protected void onPostExecute() {
        sentdialog();
        loadingDialog.dismiss();
    }
    @Override
    protected Void doInBackground(Void... arg0) {
        postData();
        publishProgress();
        return null;
    }

}
</code></pre>

<p>Below is the sent dialog script.</p>

<pre><code>public void sentdialog(){
    //set up dialog
    final Dialog sentdialog = new Dialog(context);
    sentdialog.setContentView(R.layout.sentdialog);
    sentdialog.setTitle("Sent");
    sentdialog.setCancelable(true);

    final Button button = (Button) sentdialog.findViewById(R.id.Button01);
    button.setOnClickListener(new OnClickListener() {
        public void onClick(View v) {
            sentdialog.dismiss();
        }
    });   
    sentdialog.show();
} 
</code></pre>
