My Activity is trying to create an AlertDialog which requires a Context as a parameter. This works as expected if I use:
AlertDialog.Builder builder = new Al
In Activity on click of button showing a dialog box
Activity
Dialog dialog = new Dialog(MyActivity.this);
Worked for me.