How to get Android WebView to handle redirects
Google redirects you to a different URL, and WebViewallows the OS to handle redirection.
Use this code WebViewfor internal process redirection:
mWebView.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return false;
}
});
By the way, you can do many other interesting things in this function, such as custom processing of various URLs.