0

I want to find out the time at which the very first and the last data packets were received in my android WebView/webpage. Can anyone please suggest some way of doing this?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
50EC07
  • 25
  • 6
  • This is just an idea right now that I want to implement. I thought of using onPageStarted() & onPageFinished() methods (of WebViewClient) to find time for first and last packets respectively. But I am not sure if that would be accurate. – 50EC07 Feb 21 '13 at 08:20

1 Answers1

0

You do not have access to information about packets handled by WebView. If you need that degree of detail, do not use WebView, but instead write your own HTTP access code using Socket, as even APIs like HttpUrlConnection may shroud some of this information.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Then how do I link my webview with http access code. Is there any tutorial that can help me with this? – 50EC07 Feb 22 '13 at 07:46
  • @Mani7: "Then how do I link my webview with http access code" -- typically, you don't. I have no idea why you "want to find out the time at which the very first and the last data packets were received", as that really should not matter for much at runtime. If you are simply interested in this during development, you can use tools that reside outside the device, such as a Wireshark-enabled WiFi router, to try to determine this. – CommonsWare Feb 22 '13 at 12:43