0

I already tried to use TrafficStats but it s not the answer of my problem, cause it only gets total data since device reboot, but in my project i must continue to keep data usage even before reboot, i also consider that to write total data in a file regularly (ex. to get total usage in every our and keeping it up-dated so that i can compare it with the last result of getTotalRxBytes(), if it s higher than from the files that means device didnt reboot. else means device rebooted. which means i can get total byte value from the file i wrote before. But in this case i can not seperate data usage daily or weekly.

Ps: We can't get higher level of 5.0 cause our device is only useable for 5.0 max.Thats why i cant use Network Stats Manager library.

Thanks.

  • Maybe you can use NetworkStatsManagerLibrary on pre-lollipop with appcompat – Zoe Apr 02 '17 at 07:58
  • i took a short look but it seems like it s for material designs or something ? – Maide Nur Oğul Apr 02 '17 at 08:05
  • APpCompat has a broad field. It is app compatibility after all. If NetworkStatsManagerLibrary is a android library(and not external from a 3rd party vendor) you could try using an APpCompatActivity to get it to work. I haven't done a lot with AppCompat, so I cannot guarantee this works – Zoe Apr 02 '17 at 08:07

0 Answers0