Reputation: 7635
How can I calculate the website speed in Android, in other words how soon it will open up in browser. I also wish to calculate all the statistics of that particular page e.g. total bytes or connection time etc.
Upvotes: 2
Views: 468
Reputation: 11251
The logic may not be very accurate, but this is what I think:
HttpConnection
to that website.HttpConnection
, start reading the contents of the website, and store it all into a string variableNow, Analysis:
size/time taken
is your current internet speedThis might not work accurately in some situations, like when the URLs are being redirected, I guess.
It's still what I think, maybe better options are available.
Upvotes: 1
Reputation: 3817
You could:
Or, you could
Check here: http://developer.android.com/reference/android/webkit/WebViewClient.html
Upvotes: 3