Java tutorial
//package com.java2s; import android.app.Activity; import android.util.Log; import android.app.AlertDialog; public class Main { static void alert(Activity act, String Tag, String message) { AlertDialog.Builder bld = new AlertDialog.Builder(act); bld.setMessage(message); bld.setNeutralButton("OK", null); Log.d(Tag, "Showing alert dialog: " + message); bld.create().show(); } }