javascript - window.close() not working in android webview? -
Eclipse test on Android 4.1 device I am trying to open an html / javascript webpage, My localhost is hosted now, through a webview in my Android application. The page below estimates to close the bus after 2 seconds with the code I'm able to get a Hello warning using WebChromeClient. But the window is still not working. Any help would be appreciated. PS: Here's how I am loading the URL: Try it out: Description: To turn off the given webview Notify the host application and remove it from view system if necessary. At this point, Webcor has stopped any loading in this window and has removed any cross-scripting capability in Javascript.
WebSettings ws = webView.getSettings (); Ws.setJavaScriptEnabled (true); Ws.setJavaScriptCanOpenWindowsAutomatically (true); WebView.loadUrl ("http://192.168.1.137/abc.html"); WebView.setWebChromeClient (New WebChromeClient ());
WebChromeClient webClient = new WebChromeClient () {Close window on window (public window) {super.onCloseWindow (w); Log D. (Tag, "window closed"); }};
Public Zero Variant Wide (WebView Window)
Comments
Post a Comment