running dialog in onPostExecute Asynctask
<p>i have onPostExecute in Asynctask</p>

<pre><code>protected void onPostExecute(Void unused) {
        TextView tvStatus=(TextView) layoutSendDialog.findViewById(R.id.tvPupukSendStatus);
        if (bNodata){
            tvStatus.setText("No data to be sent!!!");              
        }else {
            if (bError){
                tvStatus.setText("Fail at record #"+String.format("%d",recordCount));
            }
            else {
                tvStatus.setText("Sending Data : Finished");
                CUtilities.showAlert(CInputHamaApp.this, "Data Terkirim");
                createDialogSend2();
                // Closing dashboard screen
            }
        }
//          dismissDialog(CGeneral.DIALOG_SEND);
    }
</code></pre>

<p>here is my dialog</p>

<pre><code>private Dialog createDialogSend2(){
    AlertDialog.Builder builder = new AlertDialog.Builder(CInputHamaApp.this);
    builder.setMessage("Anda yakin untuk update?");
    builder.setTitle("Warning") ;
    builder.setPositiveButton("YES",  new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dlg, int sumthin) {
            Intent i2 = new Intent(CInputHamaApp.this, CInputHamaApp.class);
            startActivity(i2);
            }
            });
    builder.setNegativeButton("No",  new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dlg, int sumthin) {
            // do nothing – it will close on its own
            }
            });
    return builder.create();        
}//createDialogSend2
</code></pre>

<p>i put <code>createDialogSend2();</code> in this onPostExecute code</p>

<pre><code>           else {
                    tvStatus.setText("Sending Data : Finished");
                    CUtilities.showAlert(CInputHamaApp.this, "Data Terkirim");
                    createDialogSend2();
                    // Closing dashboard screen
                }
</code></pre>

<p>but the result is when the status is finished the dialog show alert only, and <code>createDialogSend2();</code> not running.</p>

<p>how to show <code>createDialogSend2()</code> when text send Data is finished</p>

<p>BR</p>

<p>Alex</p>
