Java tutorial
//package com.java2s; import android.app.AlertDialog; import android.content.Context; public class Main { public static void ShowNoNetworkMessage(Context ctx) { AlertDialog.Builder alert = new AlertDialog.Builder(ctx); alert.setMessage("No network connection available."); //alert.setTitle("StormCloud"); alert.setPositiveButton("OK", null); alert.setCancelable(true); alert.create().show(); //return alert; } }