Meaning of getMobileRxPackets and getTotalRxBytes in TrafficStats

1.3k views Asked by At

What exactly means getMobileRxBytes () ? Get the total number of bytes received through the mobile interface. Total number since when ? Device boot, phone unplug ?

Also getTotalRxBytes ? Get the total number of bytes received through all network interfaces. What interfaces beside mobile and WI-FI ? If only these two, it's okay to assume that getTotalRxBytes - getMobileRxBytes = WI-FI traffic ?

1

There are 1 answers

0
Timmy On

Since device boot. Because these methods actually get value from virtual text file stored in memory which will be reset when reboot device.

Yes. You may refer to Networktype of android to distinguish.