Hi everybody!

I would try to explain "my problem" the best I can.

I am trying to monitor the 3g traffic. I am using a background service
wired to a BroadcastReceiver
(ConnectivityManager.CONNECTIVITY_ACTION).

The service is started when 3g is connected and stopped when
disconnected. While the service is alive, a timer check the 3g data
used by the phone (TrafficStats class). Also, when the
BroadcastReceiver fires because of 3g has been disconnected, I check
again the TrafficStats.

If I setup the timer to check 3g data usage every minute (for
example), "everything" is OK but, if I change the timer to check 3g
data every 30 minutes, and then, in this interval, I start using a lot
of 3g data (facebook, mail, download files, etc), when I switch off
3g, the broadcastReceiver fires (that's perfect), but TrafficStats do
not return the values excepted. It returns the same values as the last
interval...

In short, the probme is that when I switch off 3g connection, I am not
getting right values form trafficStats. Why? What could I do to
resolver this issue?

I am comparing the values with the values given by the 3g Whatdog app
(very good monitoring 3g data app).

It's so difficult to me to explain the problem but I hope you could
understand me.

Thanks very much for reading this :)

Pabloku

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to