From 59d02ab95b3aeff7076f012828b35703a9015a10 Mon Sep 17 00:00:00 2001 From: Martijn Swart Date: Mon, 16 Mar 2020 18:35:54 +0100 Subject: [PATCH] fix(android): support for multi-line text in LocalNotifications (#2552) --- .../plugin/notification/LocalNotificationManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/capacitor/src/main/java/com/getcapacitor/plugin/notification/LocalNotificationManager.java b/android/capacitor/src/main/java/com/getcapacitor/plugin/notification/LocalNotificationManager.java index 2e095269f..a4fd2b3d3 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/plugin/notification/LocalNotificationManager.java +++ b/android/capacitor/src/main/java/com/getcapacitor/plugin/notification/LocalNotificationManager.java @@ -155,6 +155,10 @@ private void buildNotification(NotificationManagerCompat notificationManager, Lo .setGroupSummary(localNotification.isGroupSummary()) .setDefaults(Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS); + + // support multiline text + mBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(localNotification.getBody())); + String sound = localNotification.getSound(); if (sound != null) { Uri soundUri = Uri.parse(sound);