How to Enable JavaScript in Webview Android 

By default, javascript is disabled in android webview. use this piece of code to enable it

WebView myWebView = (WebView) findViewById(R.id.webview);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);

The boolean “true” sets the JavaScript enabled, to disable JavaScript, use boolean “false”

,

Post navigation

Leave a Reply

Your email address will not be published. Required fields are marked *