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

Commit

Permalink
Minor updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbritch committed Dec 3, 2020
1 parent 31ef1cc commit 1a3ce4d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
Expand Up @@ -70,7 +70,7 @@ public void SendNotification(string title, string message, DateTime? notifyTime

PendingIntent pendingIntent = PendingIntent.GetBroadcast(AndroidApp.Context, pendingIntentId++, intent, PendingIntentFlags.CancelCurrent);
long triggerTime = GetNotifyTime(notifyTime.Value);
AlarmManager alarmManager = GetAlarmManager();
AlarmManager alarmManager = AndroidApp.Context.GetSystemService(Context.AlarmService) as AlarmManager;
alarmManager.Set(AlarmType.RtcWakeup, triggerTime, pendingIntent);
}
else
Expand Down Expand Up @@ -106,12 +106,6 @@ void CreateNotificationChannel()
channelInitialized = true;
}

AlarmManager GetAlarmManager()
{
AlarmManager alarmManager = Android.App.Application.Context.GetSystemService(Context.AlarmService) as AlarmManager;
return alarmManager;
}

long GetNotifyTime(DateTime notifyTime)
{
DateTime utcTime = TimeZoneInfo.ConvertTimeToUtc(notifyTime);
Expand Down
Expand Up @@ -9,7 +9,6 @@ namespace LocalNotifications.iOS
public class iOSNotificationManager : INotificationManager
{
int messageId = 0;

bool hasNotificationsPermission;

public event EventHandler NotificationReceived;
Expand Down
Binary file modified LocalNotifications/Screenshots/local-notifications-msg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1a3ce4d

Please sign in to comment.