android question about service and the method onstartcommand
- by user516883
In a service class there is a method to start the service. If that service gets done executing does it runs onstartcommand from the beginning? Is onstartcommand sorta like a loop as long as the service is running. For example i have
onstartcommand
{
int x = 0;
if(x == 0){
}
else{
}
}
After that is complete does it run it again. If you know that answer please explain. I have read google explanation of services and it did not explain that part very well. Is onstartcommand sorta like a loop as long as the service is runnning