From 74f3c7ef822c0bd3aa2d1983d9f5079c1df7bf5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Zs=C3=B6g=C3=B6n?= <10298071+andreszs@users.noreply.github.com> Date: Mon, 15 Apr 2024 10:12:17 -0300 Subject: [PATCH 1/2] Update FCMService.kt Fixes #263 --- src/android/com/adobe/phonegap/push/FCMService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/com/adobe/phonegap/push/FCMService.kt b/src/android/com/adobe/phonegap/push/FCMService.kt index 890283206..7c1d6a0b1 100644 --- a/src/android/com/adobe/phonegap/push/FCMService.kt +++ b/src/android/com/adobe/phonegap/push/FCMService.kt @@ -916,7 +916,7 @@ class FCMService : FirebaseMessagingService() { } mBuilder.setContentText(fromHtml(messageStr)) - mBuilder.setStyle(bigText) + mBuilder.setStyle(NotificationCompat.BigTextStyle().bigText(messageStr)) } } } From 6b4b0ebd0b65f0d1d2965ef6acd1301399dcf475 Mon Sep 17 00:00:00 2001 From: Erisu Date: Sat, 31 Aug 2024 14:58:32 +0900 Subject: [PATCH 2/2] fix(android): clipped notification text and expand arrow --- src/android/com/adobe/phonegap/push/FCMService.kt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/android/com/adobe/phonegap/push/FCMService.kt b/src/android/com/adobe/phonegap/push/FCMService.kt index 7c1d6a0b1..2f0677488 100644 --- a/src/android/com/adobe/phonegap/push/FCMService.kt +++ b/src/android/com/adobe/phonegap/push/FCMService.kt @@ -906,17 +906,16 @@ class FCMService : FirebaseMessagingService() { setNotification(notId, "") message?.let { messageStr -> - val bigText = NotificationCompat.BigTextStyle().run { - bigText(fromHtml(messageStr)) - setBigContentTitle(fromHtml(it.getString(PushConstants.TITLE))) + val bigText = NotificationCompat.BigTextStyle() + .bigText(fromHtml(messageStr)) + .setBigContentTitle(fromHtml(it.getString(PushConstants.TITLE))) - it.getString(PushConstants.SUMMARY_TEXT)?.let { summaryText -> - setSummaryText(fromHtml(summaryText)) - } + it.getString(PushConstants.SUMMARY_TEXT)?.let { summaryText -> + bigText.setSummaryText(fromHtml(summaryText)) } mBuilder.setContentText(fromHtml(messageStr)) - mBuilder.setStyle(NotificationCompat.BigTextStyle().bigText(messageStr)) + mBuilder.setStyle(bigText) } } }