I had problems with this, but I was able to solve it myself at the end. In your activity, you have
inside your code - make sure you have a function with a window to run . Since you are using PhoneGap, I would suggest that javascript is already included in webview. If not, you also need to enable this, you may find my post helpful in figuring out this. super.loadUrl("javascript:yourFunction()"); window.yourFunction = function()
Call javascript functions in webview from activity class
NTN
source
share