LocalNotification createNotification(PPNotification notification) { LocalNotification iOSNotification = new LocalNotification(); iOSNotification.alertAction = notification.Title; iOSNotification.alertBody = notification.Body; iOSNotification.fireDate = notification.FireDate; return(iOSNotification); }
internal bool DestroyNotification(PPNotification notification) { foreach (LocalNotification iOSNotification in NotificationServices.localNotifications) { if (notificationMatch(notification, iOSNotification)) { NotificationServices.CancelLocalNotification(iOSNotification); return(true); } } return(false); }
internal LocalNotification RegisterNotification(PPNotification notification) { LocalNotification iosNotification = createNotification(notification); return(iosNotification); }
void INotificationInterchange.CancelNotification(PPNotification notification) { register.DestroyNotification(notification); }
void INotificationInterchange.SendNotification(PPNotification notification) { LocalNotification iOSNotification = register.RegisterNotification(notification); NotificationServices.ScheduleLocalNotification(iOSNotification); }
bool notificationMatch(PPNotification notification, LocalNotification iOSNotification) { return(notification.Title.Equals(iOSNotification.alertAction) && notification.Body.Equals(iOSNotification.alertBody) && notification.FireDate.Equals(iOSNotification.fireDate)); }