美文网首页Android Utils
Android 流量统计方法

Android 流量统计方法

作者: 几千里也 | 来源:发表于2017-02-09 13:52 被阅读70次

    官方文档链接 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.
    

    相关文章

      网友评论

        本文标题:Android 流量统计方法

        本文链接:https://www.haomeiwen.com/subject/mpviittx.html