From e0421b509c81a33f4a8a33741e8efafd7651eb07 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Wed, 21 Aug 2019 17:41:54 +0200 Subject: [PATCH] LocationService: invoke startForeground in onCreate(). --- .../info/nightscout/androidaps/services/LocationService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/services/LocationService.java b/app/src/main/java/info/nightscout/androidaps/services/LocationService.java index feec4dcab8..485ad1823a 100644 --- a/app/src/main/java/info/nightscout/androidaps/services/LocationService.java +++ b/app/src/main/java/info/nightscout/androidaps/services/LocationService.java @@ -86,6 +86,8 @@ public class LocationService extends Service { @Override public void onCreate() { + super.onCreate(); + startForeground(PersistentNotificationPlugin.ONGOING_NOTIFICATION_ID, PersistentNotificationPlugin.getPlugin().updateNotification()); if (L.isEnabled(L.LOCATION)) log.debug("onCreate");