NetworkStats
NetworkStats copied to clipboard
Same numbers for Tx and Rx
Hi Robert, thanks for sharing this experimental app. We've noticed that both numbers for Rx and Tx for NetworkStatsManager are equal and remains the same. Not sure how to operate the app.
Thanks,
Martins
Please checkout this commit and see if the issue is still present.
Nope, a bizarre high number, equal rx to tx, for All uid (2421818450). 0 for both rx/tx uid com.adroid.browser
Hey Robert, Thanks for this sample, but how can I fetch the Rx/Tx of both Mobile Data and Wifi for specific Application using NetworkStatsManager (I am working on API 23 and above), please revert me if you can test for the same.
I posted update for the same Rx and Tx numbers. If you would still be interested in the project see if it helped..
The way NetworkStats buckets are processed is slightly wrong, I think you should be saying
while (networkStatsWifi.hasNextBucket()) {
networkStatsWifi.getNextBucket(bucket);
rxBytesWifi += bucket.getRxBytes();}
but in all cases you are just returning bucket.getRxBytes() for the first bucket.