Github user SharUpOff commented on the issue: https://github.com/apache/cordova-plugin-splashscreen/pull/130 I got it so: ```javascript window.addEventListener('beforeunload', function() { navigator.splashscreen.show(); }); ``` I show splash when reload my application without restarting cordova in some cases (language switching, debug mode, etc). Closing by "back" button fires "beforeunload" (to "about:blank" i think) and showing splash in same time activity being finished. Also i use crosswalk, maybe it fires "beforeunload", not the native WebView. Trace here: ```java FATAL EXCEPTION: main Process: scat.su.calltaxi, PID: 16999 android.view.WindowManager$BadTokenException: Unable to add window â token android.os.BinderProxy@5d0142d is not valid; is your activity running? at android.view.ViewRootImpl.setView(ViewRootImpl.java:567) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:310) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:86) at android.app.Dialog.show(Dialog.java:326) at org.apache.cordova.splashscreen.SplashScreen$5.run(SplashScreen.java:318) at android.app.Activity.runOnUiThread(Activity.java:5558) at org.apache.cordova.splashscreen.SplashScreen.showSplashScreen(SplashScreen.java:281) at org.apache.cordova.splashscreen.SplashScreen.onMessage(SplashScreen.java:189) at org.apache.cordova.PluginManager.postMessage(PluginManager.java:312) at org.apache.cordova.CordovaWebViewImpl.postMessage(CordovaWebViewImpl.java:377) at org.apache.cordova.splashscreen.SplashScreen$3.run(SplashScreen.java:169) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5517) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org