From d290555abab4193a98ad10779d5e2676f9da859b Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Mon, 8 Feb 2021 13:25:29 +0800 Subject: [PATCH] fix notification to include text message even when not expanded --- .../com/geeksville/mesh/service/MeshServiceNotifications.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/geeksville/mesh/service/MeshServiceNotifications.kt b/app/src/main/java/com/geeksville/mesh/service/MeshServiceNotifications.kt index c7b315535..5e02067a4 100644 --- a/app/src/main/java/com/geeksville/mesh/service/MeshServiceNotifications.kt +++ b/app/src/main/java/com/geeksville/mesh/service/MeshServiceNotifications.kt @@ -152,7 +152,7 @@ class MeshServiceNotifications( fun createServiceStateNotification(summaryString: String): Notification { val builder = commonBuilder(channelId) with(builder) { - setPriority(NotificationCompat.PRIORITY_MIN) + priority = NotificationCompat.PRIORITY_MIN setCategory(Notification.CATEGORY_SERVICE) setOngoing(true) setContentTitle(summaryString) // leave this off for now so our notification looks smaller @@ -163,10 +163,11 @@ class MeshServiceNotifications( fun createMessageNotifcation(name: String, message: String): Notification { val builder = commonBuilder(messageChannelId) with(builder) { - setPriority(NotificationCompat.PRIORITY_DEFAULT) + priority = NotificationCompat.PRIORITY_DEFAULT setCategory(Notification.CATEGORY_MESSAGE) setAutoCancel(true) setContentTitle(name) + setContentText(message) setStyle( NotificationCompat.BigTextStyle() .bigText(message),