Problem in "FLAG_ACTIVITY_CLEAR_TOP"
<p>I used the following function to come back to Home page(Home Activity) from any child.<br>
My task is if we are in any child page it should come to home page and want to display an alert box.
Its working fine for all child pages without the alert dialog.<br>
Its working for following case with alert dialog<br>
For ex: HomePage -> child A<br>
Its coming to home page and showing the alert dialog    </p>

<p>Its not working for if i'm in more than one child pages<br>
For ex: HomePage -> child A -> Child B<br>
Its coming to HomePage and became unfocussed, but the alert dialog is not showing.<br>
According to my task, the alert should be cancellabe=false, so cant able to go back with out clicking button in alert dialog</p>

<pre><code>public void ShowConnectivityMessage()
    {
        Intent intent = new Intent( this, Homepage.class );
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

        this.startActivity( intent );

        new AlertDialog.Builder(this)
        .setTitle("Cannot Connect To Service")
        .setMessage("The service has been unreachable for 1 hour. ")
        .setCancelable(false)
        .setPositiveButton("Help me shut down the app", new DialogInterface.OnClickListener() 
        {
            @Override
            public void onClick(DialogInterface dialog, int which) 
            {
                if(Homepage.bIsLoggedInM)
                {
                    StartTimer();
                    ShowHowToQuitTheApp();
                }
            }
        }).show();
    }    
</code></pre>

<p>So please any one help me.................</p>
