How to restart service in android to call service oncreate again

Call this two methods right after each other, which will causes the Service to stop and start. Don't know any method that "restarts" it. This is how I have implemented it in my application.

stopService(new Intent(this, YourService.class));
startService(new Intent(this, YourService.class));

The best solution is to use onDestroy().

When need to restart the service just call

RESTARTSERVICE = true;
stopService(new Intent(this, CLASS_OF_SERVICE.class));

and

public void onDestroy()
{
   if (RESTARTSERVICE)
    {
       startService(new Intent(this, CLASS_OF_SERVICE.class));
    }
}