Example #1
0
 public void DefaultProcessCurrentNotification(GowNotification notification)
 {
     if (notification == null || !notification.isValid)
     {
         return;
     }
     _device.ShowDefaultDialog(notification.pushId, notification.title, notification.message,
                               () => { RemoveDeviceNotification(notification.pushId); });
 }
Example #2
0
 private void OnCurrentNotificationRecieved(GowNotification notification)
 {
     if (CurrentNotificationRecieved != null)
     {
         CurrentNotificationRecieved(notification, n => { RemoveDeviceNotification(n.pushId); });
     }
     else
     {
         DefaultProcessCurrentNotification(notification);
     }
 }
Example #3
0
 private static void Controller_CurrentNotificationRecieved(GowNotification notification,
                                                            Action <GowNotification> notificationCallback)
 {
     if (CurrentNotificationRecieved != null)
     {
         CurrentNotificationRecieved(notification, notificationCallback);
     }
     else
     {
         Controller.instance.DefaultProcessCurrentNotification(notification);
     }
 }
Example #4
0
        protected void OnCurrentNotificationRecieved(JsonObject notification)
        {
            if (!GowNotification.IsValid(notification))
            {
                LogUtils.LogWarning("Not valid json : " + (notification == null ? "<NULL>" : GOWMiniJSON.Serialize(notification)));
                return;
            }

            if (CurrentNotificationRecieved != null)
            {
                CurrentNotificationRecieved(new GowNotification(notification));
            }
        }
Example #5
0
 protected void OnNotificationsRecieved(JsonObject[] notifications)
 {
     if (NotificationRecieved != null)
     {
         NotificationRecieved(notifications.Select(json => {
             if (!GowNotification.IsValid(json))
             {
                 LogUtils.LogWarning("Not valid json : " + json == null ? "<NULL>" : GOWMiniJSON.Serialize(json));
                 return(null);
             }
             return(new GowNotification(json));
         }).SelectNotNull().ToArray());
     }
 }