Http://www.cnblogs.com/sunzn/archive/2013/04/03/2998113.html
Mwebview.setwebviewclient (New Mywebviewclient ());
Mwebview.loadurl (URL);
Recently do the project on the mobile phone to load a WebView Web page third-party login, the success of the certification will jump to the company's Web page, the mobile phone client needs to get the data from the Web page to carry the UID of the cookie to interact with, we can in webviewclient The onpagefinished (WebView view, String URL) method uses Cookiemanager to get the value of the Cookie that is carried in the Web page after the load is completed, with the following code:
Private class Mywebviewclient extends Webviewclient {public boolean shouldoverrideurlloading (WebView view, String URL) { webview.loadurl (URL); return true; } public void onpagefinished (WebView view, String URL) { Cookiemanager Cookiemanager = Cookiemanager.getinstance (); C6/>string cookiestr = Cookiemanager.getcookie (URL); LOG.E ("Sunzn", "Cookies =" + cookiestr); super.onpagefinished (view, URL); } }
Android programming under WebView load a webpage how to get the Cookie value of a webpage