How to fire javascript event in Android WebView on app resume
问题 I have a WebView in my Android app, and I need to run a JavaScript function whenever the app/WebView is switched to (e.g. using the app switcher or tapping the icon from the home screen) the device wakes from sleep (with the app having still been on the screen when the device went to sleep). Using a visibilitychange event listener in my webpage javascript only works for case 1. Ideally I would like to trigger some kind of javascript event using the Android onResume() java function, but how?