when ever showProgress(); is called i am getting an exception and application is crashing , check for the reason and found it was this line causing the issue
public void showProgress() {
try {
//here is the crash happening
windowManager.addView(progressLayout, layoutParams);
}
catch (WindowManager.BadTokenException e){
Log.d("ProgressWindow" ,"ReasonFor"+e.toString());
}
}
any help?