inside onstart command put START_STICKY
... This service won't kill unless it is doing too much task and kernel wants to kill it for it...
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.i("LocalService", "Received start id " + startId + ": " + intent);
// We want this service to continue running until it is explicitly
// stopped, so return sticky.
return START_STICKY;
}