Issue
While loading a URL in webView there are multiple of HTTP request made while loading a single page. Is there a way to track those requests? The closest I could get is to use
public boolean shouldOverrideUrlLoading(WebView view, String url)
method to view the URL requests made but could not capture the packets each page make. I know this Question has already been asked years ago but couldn't find a solid answer that I can depend. Any help would be helpful
Solution
You can override
public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request)
method of WebViewClient. This will be called everytime javascript code requests any resource inside Webview.
Answered By - Vishal Arora
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.