tags:

views:

46

answers:

1

I'm trying to write an Android widget that shows how much data has been transferred over 3G/WIFI/EDGE but I can't seem to find the API call, even though other widgets do this. Does anyone know what the API calls are to get the data usage?

+1  A: 

Ah, found it, android.net.TrafficStats.

Fasaxc
Actaully, TrafficStats is 2.2 only. Turns out you have to dig in /sys/class/net/statistics to find it on older phones.
Fasaxc