Alert Dialog dismissing on ScreenLock
<p>My Alert Dialog is dismissing when screen is locked and Unlocked.In my case,</p>

<p>1)Starting connection in asynctask (which is inner class),here progress dialog starts saying "please wait...".
2)After completion of connection ProgressDilog is dismissed and Alert Message is shown.</p>

<p>So,In this process when i lock the screen when Connection is started, Alert Message is not shown and the same Activity in previous state is shown.</p>

<pre><code>alertBuilder = new AlertDialog.Builder(Registration.this);
alertBuilder.setMessage(Constants.TEXT_REGISTERED_SUCCESSFULLY);
alertBuilder.setCancelable(false);
alertBuilder.setPositiveButton(Constants.TEXT_OK, new android.content.DialogInterface.OnClickListener() {

@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
    Util.saveData(Registration.this);
    Intent thanksYouIntent = new Intent(Registration.this,ThankYouActivity.class);
    Registration.this.finish();
} });
alertBuilder.create().show();
</code></pre>

<p>This is my Code for raising the dialog.I heard to bind the dialog to activity so  i tried like <b>alertBuilder.create().setOwnerActivity(RegistrationActivity.this)</b>.This is also not showing any results.</p>

<p>One thing I have no clarity is what happens to inner asyncTask which is running Connection when the parent activity is paused.Any body plz help me out.</p>

<p>Thanks in advance,
Sha.</p>
