Java tutorial
//package com.java2s; import android.app.AlertDialog; import android.content.Context; public class Main { public static void okButtonAlertDialog(String message, Context context) { AlertDialog.Builder alertDialog = new AlertDialog.Builder(context); alertDialog.setMessage(message); alertDialog.setPositiveButton("Ok", null); alertDialog.setCancelable(false); alertDialog.show(); } }