Skip to content

Commit 59d02ab

Browse files
fix(android): support for multi-line text in LocalNotifications (#2552)
1 parent c6a3b3b commit 59d02ab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

android/capacitor/src/main/java/com/getcapacitor/plugin/notification/LocalNotificationManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ private void buildNotification(NotificationManagerCompat notificationManager, Lo
155155
.setGroupSummary(localNotification.isGroupSummary())
156156
.setDefaults(Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS);
157157

158+
159+
// support multiline text
160+
mBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(localNotification.getBody()));
161+
158162
String sound = localNotification.getSound();
159163
if (sound != null) {
160164
Uri soundUri = Uri.parse(sound);

0 commit comments

Comments
 (0)