Enable JavaScript in WebView on Android – Java Example

Android WebView

This example shows how to enable JavaScript in WebView on Android using Java WebSettings class setJavaScriptEnabled method.

By Default JavaScript is disabled in a WebView. You can enable it through the WebSettings attached to your WebView. You can retrieve WebSettings with getSettings(), then enable JavaScript with setJavaScriptEnabled() method.

Share This Post On: