NetworkStats icon indicating copy to clipboard operation
NetworkStats copied to clipboard

Same numbers for Tx and Rx

Open ggmartins opened this issue 7 years ago • 5 comments

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

ggmartins avatar Mar 23 '17 17:03 ggmartins

Please checkout this commit and see if the issue is still present.

RobertZagorski avatar Mar 28 '17 08:03 RobertZagorski

Nope, a bizarre high number, equal rx to tx, for All uid (2421818450). 0 for both rx/tx uid com.adroid.browser

ggmartins avatar Mar 28 '17 17:03 ggmartins

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.

amanbajpai avatar Mar 30 '17 13:03 amanbajpai

I posted update for the same Rx and Tx numbers. If you would still be interested in the project see if it helped..

RobertZagorski avatar Oct 28 '17 08:10 RobertZagorski

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.

darryncampbell avatar Feb 02 '18 09:02 darryncampbell