I could show dialog if I uses an Activity instance but when I uses Context or Application Context instance Dialog is not showing.
AlertDialog.Builder builder = n
For some reason [at least in android 2.1] a toast can be on the application context but not a progress dialog
MyActivity.this is an activity specific context which does not crash
MyActivity.getApplicationContext() is global and will crash progress bars and in later versions also toasts.