Android4.0.3, How can I get the value of TrafficStats.setThreadStatsTag() without ddms?

StackOverflow https://stackoverflow.com/questions/12242107

  •  29-06-2021
  •  | 
  •  

Frage

In Android 4.0, Google supports TrafficStats.setThreadStatsTag() to monitor the frequency of app data transfers, but I can just see it in DDMS.

How can I get the value of each tag and not use DDMS, so I can save it on the phone? How can DDMS get the value? Is it saved somewhere in system file?

Here is a question like this, but it is for API level 8 and only get the total value: Can someone explain how TrafficStats works its magic in the Android OS?

here is googel explain the tag :http://source.android.com/tech/datausage/tags-explained.html

Thanks

War es hilfreich?

Lösung

I think i find the file store the value , it is "/proc/net/xt_qtaguid/stats".

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top