Skip to content Skip to sidebar Skip to footer

Android Webview Javascript Seems Not Working On Sony Xperia

I have tested my app on HTC and MI2 and some samsung devices, and it worked fine. However on Sony devices, it is not working at all. Java Code: mWebView.getSettings().setJavaScript

Solution 1:

Solved!

Add

webView.setWebChromeClient(newWebChromeClient());

after

webView.getSettings().setJavaScriptEnabled(true);

And add @JavascriptInterface to every function that will called from javascript.

Post a Comment for "Android Webview Javascript Seems Not Working On Sony Xperia"