public NotificationContext PushNotification( NotificationOrigins origin , Dictionary <string, string> data , List <string> deviceToken ) { _gcmNotificationContext.NotificationRequest = BuildGcmNotification(origin, data, deviceToken); var notificationPusher = new NotificationPusher(); var response = notificationPusher.PushNotification( new GcmPushNotificationBuilder(_gcmNotificationContext)); return(response); }
public NotificationServiceFactory(NotificationOrigins origin , string userId , Dictionary <string, string> data , ThresholdStatus status ) { _origin = origin; _userId = userId; // Addin notification level data.Add("NotificationLevel", GetNotificationLevel(status)); _data = data; _userProfileRepo = new UserProfileRepository(); _accountRepository = new AccountRepository(); }
private NotificationRequest BuildGcmNotification( NotificationOrigins origin , Dictionary <string, string> data , List <string> deviceTokens ) { return(new GcmNotificationRequest { CollapseKey = string.Empty , ContentType = ContentTypes.Json , Data = data , DelayWhileIdle = false , DeviceRegistrationIds = deviceTokens , DryRun = false , TimeToLive = 108 }); }
public Task <NotificationContext> PushNotificationAsync(NotificationOrigins origin, Dictionary <string, string> data, List <string> deviceToken) { throw new NotImplementedException(); }
NotificationContext INotificationService.PushNotification(NotificationOrigins origin, Dictionary <string, string> data, List <string> deviceToken) { throw new NotImplementedException(); }