Java tutorial
//package com.java2s; import android.app.Activity; import android.app.AlertDialog; public class Main { public static final void showAlertDialog(Activity ctx, String title, String text) { AlertDialog.Builder alertBuilder = new AlertDialog.Builder(ctx); alertBuilder.setTitle(title); alertBuilder.setMessage(text); AlertDialog alert = alertBuilder.create(); alert.show(); } }