What is this error, and why does it happen?
05-17 18:24:57.069: ERROR/WindowManager(18850): Activity com.mypkg.myP has leaked window com.android.internal.pol
This problem arises when trying to show a Dialog after you've exited an Activity.
I just solved this problem just by writing down the following code:
@Override
public void onDestroy(){
super.onDestroy();
if ( progressDialog!=null && progressDialog.isShowing() ){
progressDialog.cancel();
}
}
Basically, from which class you started progressDialog, override onDestroy method and do this way. It solved "Activity has leaked window" problem.