These counters contain the number of bytes since the last reboot. On some phones, these counters may periodically reset, but most of the time they only reset after a reboot. Switching to airplane mode or switching between mobile and Wi-Fi will not reset these counters.
The important point is that these counters do not include packet overhead, but only the size of the payload. Thus, this usually means that 3-4% of the data may be unaccounted for. However, if it is a streaming, torrent, or VoIP application where packet loads are small, there may be a much larger amount of unaccounted data.
Interestingly, getTotalRxBytes (received bytes for all interfaces, for example, for mobile and Wi-Fi) and getMobileRxBytes (received bytes on the mobile interface only) include all bytes, including service ones. Thus, the total number of bytes of your byte will be less than the total number of bytes of your interface and therefore less than the amount of data your network operator bills you for.
In the latter case, most streaming applications do not account for their data under their own UID. They are counted under the identifier system.media. Therefore, if you control the use of data for YouTube, only a very small amount of data will be displayed in this application; the rest will be under the media UID (1013).
OldSchool4664
source share