From 4d1515769f7fcc41b2b5a9ad911d4b7e6ab00f87 Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Tue, 1 May 2018 14:59:40 +0200 Subject: [PATCH] Make persistent notification not peak on every update on Oreo. --- .../Persistentnotification/PersistentNotificationPlugin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Persistentnotification/PersistentNotificationPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Persistentnotification/PersistentNotificationPlugin.java index 789c9df143..68ff7cec69 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Persistentnotification/PersistentNotificationPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Persistentnotification/PersistentNotificationPlugin.java @@ -138,6 +138,7 @@ public class PersistentNotificationPlugin extends PluginBase { NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx, CHANNEL_ID); builder.setOngoing(true); + builder.setOnlyAlertOnce(true); builder.setCategory(NotificationCompat.CATEGORY_STATUS); builder.setSmallIcon(R.drawable.ic_notification); Bitmap largeIcon = BitmapFactory.decodeResource(ctx.getResources(), R.mipmap.blueowl);