문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top