I am trying to run a service that polls the server every ten seconds and broadcasts the intent. I tried using Thread.sleep(10000) but that dint work. I found out about this START_NOT_STICKY constant used in the service. But I am unable to figure how do I use it. Can someone please help.
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
handleStart(intent, startId);
return START_NOT_STICKY;
}