How to run GPS listener in background using service - Android
private Handler handler;onCreate(){
handler = new Handler();
handler.post(gpsListenr);
}
Runnable gpsListener = new Runnable(){
public void run(){
// do something and then call again this listener by handler with delay time
handler.postDelay(gpsListener,1000); /// this will call gpslistener every 1 sec.
}
}
If the answers is incorrect or not given, you can answer the above question in the comment box. If the answers is incorrect or not given, you can answer the above question in the comment box.