开发者

Android Browser output download time

I'm looking for a way to output the total download time every time a new page is opened in the Android browser.

I've looked around, but can't find a place to put a timestamp for downloading a web page. There's a performance monitor in onPageStarted and onPageFinished measuring th开发者_高级运维e page loading time, but nothing (that I can see) that measures the download time.


The onPageStarted() and onPageFinished() methods are on WebViewClient and are for use with WebView in your own app, not with any existing browser application.

I am not aware that there is any API to download started/stopped even for WebView, and getting that for the user's choice of browser would be a privacy violation, since it would have to tell you what URL was being downloaded for the performance metric to have meaning.


I ended up altering android.net.http.Request. Putting a time stamp at the beginning and end of the readResponse method did the trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜