I'm currently developing a login module. After click the "login" button in a WebView, the browser will receive a json response, and then redirect to the another page. How can I intercept this json response?
I tried shouldOverrideUrlLoading (WebView view, String url) and print all the url input, but I can not find the json response.
mWebview.setWebViewClient(new WebViewClient() {
@Override
public WebResourceResponse shouldInterceptRequest (final WebView view, String url) {
Log.i("InterceptRequest", url);
return super.shouldInterceptRequest(view, url);
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
Log.i("onPageStarted", url);
}
@Override
public void onPageFinished(WebView view, String url) {
Log.i("onPageFinished", url);
}
});
I also noticed that when I can not see this response in Chrome and Firefox, but I can see it in IE.
Thank you.