From 0ca5d851f2e1598916ded43bee063915e8762ead Mon Sep 17 00:00:00 2001 From: Catfriend1 Date: Sat, 27 Apr 2019 09:09:42 +0200 Subject: [PATCH] Show notification badge if user interaction is required (fixes #406) (#408) Ref.: Android 8.0 --- .../nutomic/syncthingandroid/service/NotificationHandler.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/nutomic/syncthingandroid/service/NotificationHandler.java b/app/src/main/java/com/nutomic/syncthingandroid/service/NotificationHandler.java index 834faf71..cc532a33 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/service/NotificationHandler.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/service/NotificationHandler.java @@ -57,6 +57,7 @@ public class NotificationHandler { mPersistentChannel.enableLights(false); mPersistentChannel.enableVibration(false); mPersistentChannel.setSound(null, null); + mPersistentChannel.setShowBadge(false); mNotificationManager.createNotificationChannel(mPersistentChannel); mPersistentChannelWaiting = new NotificationChannel( @@ -65,6 +66,7 @@ public class NotificationHandler { mPersistentChannelWaiting.enableLights(false); mPersistentChannelWaiting.enableVibration(false); mPersistentChannelWaiting.setSound(null, null); + mPersistentChannelWaiting.setShowBadge(false); mNotificationManager.createNotificationChannel(mPersistentChannelWaiting); mInfoChannel = new NotificationChannel( @@ -72,6 +74,7 @@ public class NotificationHandler { NotificationManager.IMPORTANCE_LOW); mPersistentChannel.enableVibration(false); mPersistentChannel.setSound(null, null); + mPersistentChannel.setShowBadge(true); mNotificationManager.createNotificationChannel(mInfoChannel); } else { mPersistentChannel = null;