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.