Reputation: 4693
If there is any network activity on the phone could I register to some intent filter and get notified of the events?
The arrows on top in the notification bar (both for wifi and hsdpa) move, So I am guessing there is some way to get notified.
Upvotes: 2
Views: 122
Reputation: 24820
Use the following code to register for listener
((TelephonyManager)mContext.getSystemService(Context.TELEPHONY_SERVICE))
.listen(mPhoneStateListener, PhoneStateListener.LISTEN_DATA_CONNECTION_STATE
| PhoneStateListener.LISTEN_DATA_ACTIVITY);
in Phonestatelistener.OnDataActivity you will recieve callback
Upvotes: 1