From 290a373c1f99b1d2767f04ca5c97237e38193ee3 Mon Sep 17 00:00:00 2001 From: sagarmp02 <37401688+sagarmp02@users.noreply.github.com> Date: Thu, 7 Mar 2019 10:17:46 +0530 Subject: [PATCH 1/2] LocalNotificationImplementation.cs Add line number 37 to display notification using bigtext style --- .../LocalNotificationsImplementation.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Plugin.LocalNotifications.Android/LocalNotificationsImplementation.cs b/src/Plugin.LocalNotifications.Android/LocalNotificationsImplementation.cs index 4477ddc..ac59135 100644 --- a/src/Plugin.LocalNotifications.Android/LocalNotificationsImplementation.cs +++ b/src/Plugin.LocalNotifications.Android/LocalNotificationsImplementation.cs @@ -34,7 +34,7 @@ public void Show(string title, string body, int id = 0) builder.SetContentTitle(title); builder.SetContentText(body); builder.SetAutoCancel(true); - + builder.SetStyle(new NotificationCompat.BigTextStyle().BigText(body)); if (NotificationIconId != 0) { builder.SetSmallIcon(NotificationIconId); @@ -154,4 +154,4 @@ private long NotifyTimeInMilliseconds(DateTime notifyTime) return utcAlarmTimeInMillis; } } -} \ No newline at end of file +} From 07cdbd5f0ce2a480648ba390f380ff0faa364437 Mon Sep 17 00:00:00 2001 From: sagarmp02 <37401688+sagarmp02@users.noreply.github.com> Date: Thu, 7 Mar 2019 12:52:53 +0530 Subject: [PATCH 2/2] LocalNotificationsImplementations.cs Showing full notification message. --- .../LocalNotificationsImplementation.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Plugin.LocalNotifications.Android/LocalNotificationsImplementation.cs b/src/Plugin.LocalNotifications.Android/LocalNotificationsImplementation.cs index ac59135..0f1f926 100644 --- a/src/Plugin.LocalNotifications.Android/LocalNotificationsImplementation.cs +++ b/src/Plugin.LocalNotifications.Android/LocalNotificationsImplementation.cs @@ -30,11 +30,12 @@ public class LocalNotificationsImplementation : ILocalNotifications /// Id of the notification public void Show(string title, string body, int id = 0) { - var builder = new Notification.Builder(Application.Context); - builder.SetContentTitle(title); - builder.SetContentText(body); - builder.SetAutoCancel(true); - builder.SetStyle(new NotificationCompat.BigTextStyle().BigText(body)); + var builder = new NotificationCompat.Builder(Application.Context) + .SetContentTitle(title) + .SetContentText(body) + .SetSound(RingtoneManager.GetDefaultUri(RingtoneType.Alarm)) + .SetStyle(new NotificationCompat.BigTextStyle().BigText(body)); + if (NotificationIconId != 0) { builder.SetSmallIcon(NotificationIconId);