I have a function::
public void doSleep() {
handler.postDelayed(
new Runnable() {
public void run() { doCom(); }
}, 10000);
}
This is linked with doCom which starts this again. how can I finsh this at the end of the service?
create a boolean flag in your class called sleep = true;
and set sleep = false; if you want to stop it.