官方文档链接 TrafficStats
static long getMobileRxBytes()
Return number of bytes received across mobile networks since device boot.
static long getMobileRxPackets()
Return number of packets received across mobile networks since device boot.
static long getMobileTxBytes()
Return number of bytes transmitted across mobile networks since device boot.
static long getMobileTxPackets()
Return number of packets transmitted across mobile networks since device boot.
static long getTotalRxBytes()
Return number of bytes received since device boot.
static long getTotalRxPackets()
Return number of packets received since device boot.
static long getTotalTxBytes()
Return number of bytes transmitted since device boot.
static long getTotalTxPackets()
Return number of packets transmitted since device boot.
static long getUidRxBytes(int uid)
Return number of bytes received by the given UID since device boot.
static long getUidRxPackets(int uid)
Return number of packets received by the given UID since device boot.
static long getUidTxBytes(int uid)
Return number of bytes transmitted by the given UID since device boot.
static long getUidTxPackets(int uid)
Return number of packets transmitted by the given UID since device boot.