I\'m currently creating a foreground service with a notification that appears in the notification bar when the service starts. If the service stops, the notification dismiss
this code works for me:
this.stopForeground(false); mNotificationManager.cancel(NOTIFY_ID);
and you should set your return value of onStartCommand, STRAT_STICKY will restart your service.