TruckMovers / cordova-plugin-remote-injection

DEPRECATED: Cordova plugin to allow a remote site to interact with cordova's javascript APIs when loaded within a cordova app.
Apache License 2.0
91 stars 95 forks source link

Fix android.view.WindowManager$BadTokenException crashes #40

Open zsoltboldizsar opened 6 years ago

zsoltboldizsar commented 6 years ago

Connected issue #31

The fix consists of checking whether the host activity, where the dialog is about to be shown, is still running and only proceed if it is, hence avoiding the crash from happening.

ccorcos commented 6 years ago

I will test this out in the next week or two.

ccorcos commented 6 years ago

The default promptInterval was changed from 10 to 1 btw.

int promptInterval = webView.getPreferences().getInteger("CRIPageLoadPromptInterval", 1);
zsoltboldizsar commented 6 years ago

Changed it back to its original value. Thanks for your time.

ccorcos commented 6 years ago

Its in production. No more crashes :)