public static void showNoConnectionDialog(Context ctx1) { 
        final Context ctx = ctx1; 
        AlertDialog.Builder builder = new AlertDialog.Builder(ctx); 
        builder.setCancelable(true); 
        builder.setMessage(R.string.no_connection); 
        builder.setTitle(R.string.no_connection_title); 
        builder.setPositiveButton(R.string.settings, new DialogInterface.OnClickListener() { 
            public void onClick(DialogInterface dialog, int which) { 
                ctx.startActivity(new Intent(Settings.ACTION_WIRELESS_SETTINGS)); 
            } 
        }); 
        builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { 
            public void onClick(DialogInterface dialog, int which) { 
                return; 
            } 
        }); 
        builder.setOnCancelListener(new DialogInterface.OnCancelListener() { 
            public void onCancel(DialogInterface dialog) { 
                return; 
            } 
        }); 
 
        builder.show(); 
    }

这个对话框就是提示你没有获得网络 不能联通
本问参考http://osdir.com/ml/Android-Developers/2009-11/msg05044.html