public void DefaultProcessCurrentNotification(GowNotification notification) { if (notification == null || !notification.isValid) { return; } _device.ShowDefaultDialog(notification.pushId, notification.title, notification.message, () => { RemoveDeviceNotification(notification.pushId); }); }
private void OnCurrentNotificationRecieved(GowNotification notification) { if (CurrentNotificationRecieved != null) { CurrentNotificationRecieved(notification, n => { RemoveDeviceNotification(n.pushId); }); } else { DefaultProcessCurrentNotification(notification); } }
private static void Controller_CurrentNotificationRecieved(GowNotification notification, Action <GowNotification> notificationCallback) { if (CurrentNotificationRecieved != null) { CurrentNotificationRecieved(notification, notificationCallback); } else { Controller.instance.DefaultProcessCurrentNotification(notification); } }
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)); } }
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()); } }