diff --git a/app/src/main/java/de/fraunhofer/fokus/OpenMobileNetworkToolkit/NotificationService.java b/app/src/main/java/de/fraunhofer/fokus/OpenMobileNetworkToolkit/NotificationService.java index 894e3f30..9349f7c8 100644 --- a/app/src/main/java/de/fraunhofer/fokus/OpenMobileNetworkToolkit/NotificationService.java +++ b/app/src/main/java/de/fraunhofer/fokus/OpenMobileNetworkToolkit/NotificationService.java @@ -53,9 +53,6 @@ private void setupNotificationUpdate() { private void stopNotificationUpdate() { Log.d(TAG, "stopNotificationUpdate"); notificationHandler.removeCallbacks(servingCellNotificaiton); - //builder.setContentText(null); - //nm.notify(1, builder.build()); - nm.cancel(4); if (notificationHandlerThread != null) { notificationHandlerThread.quitSafely(); @@ -66,6 +63,12 @@ private void stopNotificationUpdate() { } notificationHandlerThread = null; } + + + stopForeground(STOP_FOREGROUND_DETACH); + builder.setContentText(null); + nm.cancel(4); + onDestroy(); } @@ -92,6 +95,7 @@ public int onStartCommand(Intent intent, int flags, int startId) { @Override public void onDestroy() { super.onDestroy(); + stopSelf(); } private void setupNotification() {