java - Android JavaScript Bridge - Trigger Events -


probably simple question, can call native function javascript, example:

android.setvolume(0.7)

however, not know how trigger (from android/java), or handle events (js) not caused user interaction, example, alerting js when user's network state changes, battery gets below point etc.

any appreciated.

however, not know how trigger (from android/java), or handle events (js) not caused user interaction, example, alerting js when user's network state changes, battery gets below point etc.

as answer linked to, use loadurl() javascript: url, akin how bookmarklet works.

the answer on year old , labelled hack, still best way it?

i not clear why author of answer described hack. certainly, it's viable , used fair bit.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -