Monday, 26 August 2013

how to detect android phone 3G On Off events

how to detect android phone 3G On Off events

I am writing an android application that handles 3G usage .. When the user
turn on the 3G Mobile Data Connection , I want to calculate the elapsed
time of 3G usage and notify the user when the elasped time comes to a
specific time..
The problem is i don't know how to detect the 3G On Off events in order to
run certain codes when those events occur.. please help me with a detailed
example.. i am a beginner to android..
i have tried googling for it but does not help me i would like to call a
function like this one
public void function on3GOnCallback(){
// i will start counting the time here
}
public void function 0n3GOffCallback(){
// `i will stop counting the time here `
}

No comments:

Post a Comment