startForeground in onCreate

This commit is contained in:
Milos Kozak 2019-08-03 18:19:38 +02:00
parent e4a3b0656e
commit 43c0ce25ba

View file

@ -38,6 +38,8 @@ public class AlarmSoundService extends Service {
super.onCreate();
if (L.isEnabled(L.CORE))
log.debug("onCreate");
Notification notification = PersistentNotificationPlugin.getPlugin().getLastNotification();
startForeground(PersistentNotificationPlugin.ONGOING_NOTIFICATION_ID, notification);
}
public int onStartCommand(Intent intent, int flags, int startId) {