Bugsense: https://www.bugsense.com/dashboard/project/98c9e403/errors/966128323
android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@41333b60 is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:704)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:313)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:215)
at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:140)
at android.view.Window$LocalWindowManager.addView(Window.java:539)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2519)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1998)
at android.app.ActivityThread.access$600(ActivityThread.java:127)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1159)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4507)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:978)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
at dalvik.system.NativeStart.main(Native Method)
Activity isn't there yet or is already finishing (gone), and we still want to show a dialog.
Good explanations on: stackoverflow. com/questions/ 18662239/ android- view-windowmana gerbadtokenexce ption-unable- to-add- window- on-buider- s blackriver. to/2012/ 08/android- annoying- exception- unable- to-add- window- is-your- activity- running/ www.ggkf. com/android/ problems- creating- a-popup- window- in-android- activity stackoverflow. com/questions/ 7415014/ android- badtokenexcepti on-unable- to-add- window- is-your- activity- running- at
http://
http://
http://
http://
Added if(isFinished()) everywhere I could find. Not necessarily completely fixed yet.