Skip to content

Crash when reopening the App if it was closed with 'back' button #64

@atsakiridis

Description

@atsakiridis

This is not the case if the app was backgrounded with 'home' button

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.telestax.restcomm_messenger/com.telestax.restcomm_messenger.MainActivity}: android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@41ec9ce8 is not valid; is your activity running?
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2212)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2271)
        at android.app.ActivityThread.access$800(ActivityThread.java:144)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5146)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
        at dalvik.system.NativeStart.main(Native Method)
 Caused by: android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@41ec9ce8 is not valid; is your activity running?
        at android.view.ViewRootImpl.setView(ViewRootImpl.java:532)
        at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:259)
        at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
        at android.app.Dialog.show(Dialog.java:286)
        at com.telestax.restcomm_messenger.MainActivity.showOkAlert(MainActivity.java:393)
        at com.telestax.restcomm_messenger.MainActivity.onStopListening(MainActivity.java:224)
        at org.mobicents.restcomm.android.client.sdk.RCDevice.haveConnectivity(RCDevice.java:434)
        at org.mobicents.restcomm.android.client.sdk.RCDevice.updateParams(RCDevice.java:332)
        at com.telestax.restcomm_messenger.MainActivity.initializeSipFromPreferences(MainActivity.java:380)
        at com.telestax.restcomm_messenger.MainActivity.onCreate(MainActivity.java:111)
        at android.app.Activity.performCreate(Activity.java:5231)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)

            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2271)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5146)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
            at dalvik.system.NativeStart.main(Native Method)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions