Dialog didn't show
<p>I am trying to pop up a dialog when the user overwrite on a backup database so I wrote this code but it didn't work:</p>

<pre><code>$if(backupDB.exists()){
    AlertDialog.Builder builder = new AlertDialog.Builder(getBaseContext());
    builder.setTitle("Backup database...");
    builder.setMessage("You have already backup the database, do you want to overwrite?");

    builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
        public void onClick(DialogInterface dialog, int item) {
           Intent i=new Intent(getBaseContext(),FinancialSecretary.class);
           finish();
           startActivity(i);
        }
    });
    AlertDialog dialog = builder.create();
}
</code></pre>

<p>what is wronge?</p>
