From c63274f7a9f6b9900268900c6e9cee0bf9596ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Sat, 17 Nov 2018 23:48:39 +0100 Subject: [PATCH] show subtext on android-o --- .../simplecloudnotifier/service/NotificationService.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/service/NotificationService.java b/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/service/NotificationService.java index b86b5b8..86f3703 100644 --- a/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/service/NotificationService.java +++ b/android/app/src/main/java/com/blackforestbytes/simplecloudnotifier/service/NotificationService.java @@ -174,8 +174,7 @@ public class NotificationService mBuilder.setWhen(msg.Timestamp * 1000); mBuilder.setAutoCancel(true); mBuilder.setCategory(Notification.CATEGORY_MESSAGE); - mBuilder.setStyle(new NotificationCompat.InboxStyle()); - mBuilder.setGroup(prio.toString()); + mBuilder.setGroup("com.blackforestbytes.simplecloudnotifier.notifications.group."+prio.toString()); if (msg.Priority == PriorityEnum.LOW) mBuilder.setPriority(NotificationCompat.PRIORITY_LOW); if (msg.Priority == PriorityEnum.NORMAL) mBuilder.setPriority(NotificationCompat.PRIORITY_DEFAULT); @@ -218,8 +217,7 @@ public class NotificationService mBuilder.setWhen(msg.Timestamp * 1000); mBuilder.setAutoCancel(true); mBuilder.setCategory(Notification.CATEGORY_MESSAGE); - mBuilder.setStyle(new NotificationCompat.InboxStyle()); - mBuilder.setGroup(prio.toString()); + mBuilder.setGroup("com.blackforestbytes.simplecloudnotifier.notifications.group."+prio.toString()); if (ns.EnableLED) mBuilder.setLights(ns.LEDColor, 500, 500); @@ -251,7 +249,7 @@ public class NotificationService Notification n = mBuilder.build(); n.flags |= Notification.FLAG_AUTO_CANCEL; - mNotificationManager.notify(0, n); + mNotificationManager.notify((int)msg.SCN_ID, n); if (ns.EnableVibration) {