Android is equivalent to NSURLProtocol in iOS

I use NSURLHttpProtocol on iOS to intercept network calls and get information about which URL is being processed, when a request is initiated or completed, and so on. I want to know how to intercept network calls in android too. I tried using WebViewClient, but it just tells me about this webView.

I want to know if a specific call is being made via webview, which URLs are being processed, which images are uploaded to android.

Please suggest some solution on how to do this.

Example: If I have an android-based corridor application that basically has some set of webviews. How can I intercept these network calls that are made through resources inside webview?

+4
source share
1 answer

There are several third-party libraries that do this for you:

The most commonly used are Retrofit and Volley, you can read a good comparison about them in this article.

0
source

All Articles