Question

I have an application which needs to execute javascript in a Webview.

When I test it on mobile/tablet/note (Samsung Galaxy S3, Sony TX, Samsung N10.1...), it runs perfectly. However, when I test it on Kindle Fire (Android 4.3), the javascript code which I wrote in html file doesn't execute, and I'm not sure why.

Was it helpful?

Solution

Now, I got the answer. I must add the @JavascriptInterface annotation to any method that you want available to your JavaScript when running on Android 4.2 or higher.

Followed this http://developer.android.com/guide/webapps/webview.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top