I\'m very new to android and I\'m following this example.
The code says we need to do these steps to get an dialog box:
AlertDialog.Builder builder =
new AlertDialog.Builder() needs Context as input parameter. So try like
AlertDialog.Builder builder = new AlertDialog.Builder(yourActivityName.this);