facebookarchive / network-connection-class

Listen to current network traffic in the app and categorize the quality of the network.
Other
3.18k stars 515 forks source link

[Question] Usage of TrafficStats? #10

Closed huyduongtu closed 9 years ago

huyduongtu commented 9 years ago

I see Android provide this class TrafficStats from API 8. Why don't you use it instead of reading the file "/proc/net/xt_qtaguid/stats" yourself? Are there any differences between them?

SeyelentEco commented 9 years ago

Good point. This library was written awhile ago when we had a different set of requirements but now I think it might be better to just use TrafficStats. I'll submit a diff adding that support in the near future.