From my main activity, I need to call an inner class and in a method within the class, I need to show AlertDialog. After dismissing it, when the OK
activity
AlertDialog
I had dialog showing function:
void showDialog(){ new AlertDialog.Builder(MyActivity.this) ... .show(); }
I was getting this error and i just had to check isFinishing() before calling this dialog showing function.
isFinishing()
if(!isFinishing()) showDialog();