コード例 #1
0
 public async Task SendNotificationAsync(NotificationSchedulerItem item)
 {
     var alert = "{\"aps\":{\"alert\":\"" + item.Text + "\",\"sound\":\"default\"}}";
     await Program.NotificationClient.SendAppleNativeNotificationAsync(alert);
 }
コード例 #2
0
 public ActionResult ScheduleNotification(NotificationSchedulerItem item)
 {
     BackgroundJob.Schedule(() => SendNotificationAsync(item), TimeSpan.FromSeconds(item.Time));
     return(Content("Scheduled notification"));
 }