Simple AlertDialog tutorial

How to create a AlertDialog to display a message in Android:

final AlertDialog alertDialog = new AlertDialog.Builder(YourActivity.this).create();
alertDialog.setTitle(getString(R.string.app_name));
alertDialog.setIcon(R.drawable.icon);
alertDialog.setMessage("Your message here");
alertDialog.setButton("Back", new DialogInterface.OnClickListener() {
		public void onClick(DialogInterface dialog, int which) {
			alertDialog.dismiss();
		}
});
alertDialog.show();
Share

tcpdump tutorial

tcpdump and ngrep are my favorite network sniffer programs. I found a very simple yet interesting tutorial about tcpdump here: http://danielmiessler.com/study/tcpdump/

Share