I am trying to access a.com, which in turn redirects me to b.com and loads it in the webview.
How do I just get the address that a.com redirects to without loading anything in the webview?
String postData = "session=" + session; webView.postUrl(urlPassedFromArguments, EncodingUtils.getBytes(postData, "base64")); webView.setWebViewClient(new WebViewClient() { @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { if (isAdded() && getActivity() != null) Toast.makeText(getActivity(), description, Toast.LENGTH_SHORT).show(); } @Override public void onPageFinished(WebView view, String url) { try { dialog.dismiss(); } catch (Exception e) { } super.onPageFinished(view, url); Logger.e("onPageFinished url", url); if (!resolvedUrlLoaded) { String postData = "token=" + token; webView.postUrl(url, EncodingUtils.getBytes(postData, "base64")); resolvedUrlLoaded = true; } } });