If you are trying to create and display an AlertDialog, you should user AlertDialog.Builder for example.
DialogInterface, is as its name implies, an interface and only has 2 methods: cancel() and dismiss().
Creating an AlertDialog is fairly easy:
new AlertDialog.Builder(this)
.setTitle("Some Title")
.setMessage("some message")
.setPositiveButton("OK", new OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
// Some stuff to do when ok got clicked
}
})
.setNegativeButton("cancel", new OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {
// Some stuff to do when cancel got clicked
}
})
.show();
That shows a simple AlertDialog.
A tip: Check Activity.showDialog(int) and Activity.onCreateDialog() they make your life easier when using dialogs.