After configuring the setting property of the WebView, the previously set up can be directly bounce out, today write a small demo when inexplicable find alert how also come out, even if set up so much also not: Websettings.setjavascriptenabled (true); websettings.setjavascriptcanopenwindowsautomatically (true); Websettings.setallowfileaccess (TRUE);//settings allow access to file data Websettings.setsupportzoom (TRUE); Websettings.setbuiltinzoomcontrols (True); websettings.setjavascriptcanopenwindowsautomatically (true); Websettings.setcachemode (websettings.load_cache_else_network); websettings.setdomstorageenabled (true); Websettings.setdatabaseenabled (TRUE); Workaround: WebView is just a carrier, a variety of content rendering needs to use webviewchromclient to implement, so set a default base class Webchromeclient on the line, the code is as follows: Mwebview.setwebchromeclient (New Webchromeclient ());
Android WebView JS Alert dialog box does not eject the workaround