I am using Android and I have an HTML file which contains some Javascript. However, I am not able to get the Javascript code to execute. What do I need to do in order to run this code? Thanks in advance for any help.
Call getSettings().setJavaScriptEnabled(true)
on your WebView
, as JavaScript is disabled by default.
@raj asked for credible and/or official sources
@CommonsWare answered:
Call
getSettings().setJavaScriptEnabled(true)
on yourWebView
A simple search for the Android documentation provides the following official sources:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With