Exemplo n.º 1
0
    LocalNotification createNotification(PPNotification notification)
    {
        LocalNotification iOSNotification = new LocalNotification();

        iOSNotification.alertAction = notification.Title;
        iOSNotification.alertBody   = notification.Body;
        iOSNotification.fireDate    = notification.FireDate;
        return(iOSNotification);
    }
Exemplo n.º 2
0
 internal bool DestroyNotification(PPNotification notification)
 {
     foreach (LocalNotification iOSNotification in NotificationServices.localNotifications)
     {
         if (notificationMatch(notification, iOSNotification))
         {
             NotificationServices.CancelLocalNotification(iOSNotification);
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 3
0
    internal LocalNotification RegisterNotification(PPNotification notification)
    {
        LocalNotification iosNotification = createNotification(notification);

        return(iosNotification);
    }
Exemplo n.º 4
0
 void INotificationInterchange.CancelNotification(PPNotification notification)
 {
     register.DestroyNotification(notification);
 }
Exemplo n.º 5
0
    void INotificationInterchange.SendNotification(PPNotification notification)
    {
        LocalNotification iOSNotification = register.RegisterNotification(notification);

        NotificationServices.ScheduleLocalNotification(iOSNotification);
    }
Exemplo n.º 6
0
 bool notificationMatch(PPNotification notification, LocalNotification iOSNotification)
 {
     return(notification.Title.Equals(iOSNotification.alertAction) &&
            notification.Body.Equals(iOSNotification.alertBody) &&
            notification.FireDate.Equals(iOSNotification.fireDate));
 }