how to display javascript popup in android webview

一世执手 提交于 2019-12-05 11:52:07
Display name

See answers to this question:

JavaScript alert not working in Android WebView

The answer from Stephen Quan is to just set the default webChromeClient

mWebView.setWebChromeClient(new WebChromeClient());
klifa

You can allow javascript and opening windows from javascript in a webview. Just set this settings

webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);

Be careful though because enabling javascript on your app webview can bring some serious security issues

check this links

From StackOverflow

Interesting Presentacion

and this one for webviews

Official Android WebView Link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!