public async Task SendNotificationAsync(string[] notificationIds, NotificationType type, string message) { var apnsMessage = new IosNotification { Aps = new IosFields { Alert = message, Type = type } }; await SendIosNotificationAsync(notificationIds, apnsMessage); }
public async Task SendDataNotificationToAllDevicesAsync(string[] notificationIds, NotificationType type, string entity, string id = "") { var apnsMessage = new IosNotification { Aps = new IosFields { Type = type } }; var gcmMessage = new AndoridPayloadNotification { Data = new AndroidPayloadFields { Entity = entity, Event = type, Id = id } }; await SendIosNotificationAsync(notificationIds, apnsMessage); await SendAndroidNotificationAsync(notificationIds, gcmMessage); }