Hello, guru.
Can you please tell whether this code is guaranteed to restart the service?
stopService(new Intent(this, LocService.class)); startService(new Intent(this, LocService.class)); It is important that the service starts from scratch, with zero local variables.
Could it happen that at the time of the startService service will not be destroyed yet, therefore a new one will not be created, and the existing one will be revived.