Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit 1a3ce4d

Browse files
committed
Minor updates.
1 parent 31ef1cc commit 1a3ce4d

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

LocalNotifications/LocalNotifications/LocalNotifications.Android/AndroidNotificationManager.cs

+1-7
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void SendNotification(string title, string message, DateTime? notifyTime
7070

7171
PendingIntent pendingIntent = PendingIntent.GetBroadcast(AndroidApp.Context, pendingIntentId++, intent, PendingIntentFlags.CancelCurrent);
7272
long triggerTime = GetNotifyTime(notifyTime.Value);
73-
AlarmManager alarmManager = GetAlarmManager();
73+
AlarmManager alarmManager = AndroidApp.Context.GetSystemService(Context.AlarmService) as AlarmManager;
7474
alarmManager.Set(AlarmType.RtcWakeup, triggerTime, pendingIntent);
7575
}
7676
else
@@ -106,12 +106,6 @@ void CreateNotificationChannel()
106106
channelInitialized = true;
107107
}
108108

109-
AlarmManager GetAlarmManager()
110-
{
111-
AlarmManager alarmManager = Android.App.Application.Context.GetSystemService(Context.AlarmService) as AlarmManager;
112-
return alarmManager;
113-
}
114-
115109
long GetNotifyTime(DateTime notifyTime)
116110
{
117111
DateTime utcTime = TimeZoneInfo.ConvertTimeToUtc(notifyTime);

LocalNotifications/LocalNotifications/LocalNotifications.iOS/iOSNotificationManager.cs

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ namespace LocalNotifications.iOS
99
public class iOSNotificationManager : INotificationManager
1010
{
1111
int messageId = 0;
12-
1312
bool hasNotificationsPermission;
1413

1514
public event EventHandler NotificationReceived;
Loading

0 commit comments

Comments
 (0)