1

Is there a way to display of scripts JavaScript in WebView? /Android Studio

I want use WebView to display my website, but it use JavaScript.

1
  • Is it possible to provide Android's variables into Javascript of Android webView? Commented Sep 21, 2019 at 18:58

2 Answers 2

2

allow javascript in your webview:

myWebView.getSettings().setJavaScriptEnabled(true);
Sign up to request clarification or add additional context in comments.

Comments

1

Yes there is.

WebView webview = (WebView) findViewById(R.id.yourwebview);
webview.getSettings().setJavaScriptEnabled(true);

This will enable the javascript in your webview.

Hope this helps :)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.