4

I am using NSURLHttpProtocol in iOS to intercept the network calls and get information in regards to which url is processed, when request initiated or complete and so on. I want to know how to intercept the network calls in android too. I have tried using WebViewClient but it just tells me about that webView .

I want to know if a particular call is made through webview, which urls are processed, which images are loaded in android.

Please suggest some solution on how to proceed with this.

Example: If I have a android based cordova application which basically has some set of webviews. How can I intercept those network calls, which are made through the resources inside the webview ?

Nilesh Agrawal
  • 3,002
  • 10
  • 26
  • 54
  • A Google search on `NSURLHttpProtocol` is not coming up with anything much. Are you sure you that is correct? – CommonsWare Feb 07 '15 at 23:50
  • @CommonsWare : Correcting `NSUrlHttpProtocol` with `NSUrlProtocol` – Nilesh Agrawal Feb 07 '15 at 23:52
  • @CommonsWare : The question was asked in 2012. That time android volley was not present. The question is totally different. – Nilesh Agrawal Feb 07 '15 at 23:56
  • "The question was asked in 2012" -- correct. It is still a duplicate question. Moreover, the answer given then is still correct. "That time android volley was not present" -- Volley has nothing to do with intercepting network calls made by a `WebView`, as I have noted on the existing answer. "The question is totally different" -- please explain, **completely and precisely**, how your question is different, considering that the two questions have similar titles and identical lines of inquiry (what the Android equivalent of `NSUrlProtocol` is, if any). – CommonsWare Feb 08 '15 at 00:02

1 Answers1

-1

There are several third party libraries that does that for you:

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

Abdallah Alaraby
  • 2,222
  • 2
  • 18
  • 30