proDialog = new ProgressDialog(getApplicationContext());
why getApplicationContext()
because You’re trying to show a Dialog
after you’ve exited an Activity.
see full reason at Activity has leaked window that was originally added
1
solved Using progressDialog gives window leak error and doesn’t dismiss in Android