Can someone explain how TrafficStats works its magic in the Android OS?

后端 未结 2 2095
情书的邮戳
情书的邮戳 2020-12-01 10:16

I\'ve written a nice little Android app to check data usage, unfortunately it relies heavily on android.net.TrafficStats which was introduced with Froyo (Android 2.2).

2条回答
  •  佛祖请我去吃肉
    2020-12-01 10:42

    Changing it to a RandomAccessFile instead of File worked.

    Edit: See IBoS's answer for working code. Changing the accepted answer to his.

提交回复
热议问题