I have a method that scans the position and gets called on every activity I have, everytime an actions trigger I need to show an alertDialog, this is the code:

AlertDialog.Builder builder = new AlertDialog.Builder(mMainActivity.this);
                        builder.setMessage("test")
                           .setCancelable(false)
                           .setPositiveButton("go", new DialogInterface.OnClickListener() {
                               public void onClick(DialogInterface dialog, int id) {
                                   Intent intent = new Intent(mMainActivity.this,LocationDetails.class);
                                    intent.putExtra("placeId",1);
                                    startActivity(intent);

                               }
                           })
                           .setNegativeButton("cancel", new DialogInterface.OnClickListener() {
                               public void onClick(DialogInterface dialog, int id) {

                                    dialog.cancel();
                               }
                           });
                        AlertDialog alert = builder.create();
                        alert.show();


But How can I create the alert on the current activity? Because now it only gets created on AlertDialog.Builder(mMainActivity.this);


Question: Is it the same screwdriver?
Answer: The TARDIS Data Core Wiki mentions that in the Eighth Doctor novel Alien Bodies in which The Doctor uses his Mark One Sonic Screwdriver which was last seen used by the Second Doctor in Episode 3 of The War Games and allegedly destroyed centuries ago from the perspective of the Eighth Doctor.

When his companion Samantha Jones asked how this is possible, he replies:


  It's a Time Lord tool. Time doesn't work the same way for Time Lord tools.


Which suggests that what we saw and interpreted as "destroyed" on-screen isn't really the death of the screwdrivers in question, and they can regenerate or be retrieved from the past somehow.