Пример #1
0
 public void Start()
 {
     if (this.services.Services.GetService(typeof(INotificationDelegate)) != null)
     {
         //ToastNotificationManagerCompat.OnActivated += null;
         UwpPlatform.RegisterBackground <NotificationBackgroundTaskProcessor>(
             builder => builder.SetTrigger(new ToastNotificationActionTrigger())
             );
     }
 }
Пример #2
0
 public void Start()
 {
     UwpPlatform.RegisterBackground <PushNotificationBackgroundTaskProcessor>(
         builder => builder.SetTrigger(new PushNotificationTrigger())
         );
     if (this.CurrentRegistrationExpiryDate != null)
     {
         this.RequestAccess();
     }
 }
Пример #3
0
 public async void Start()
 {
     try
     {
         UwpPlatform.RegisterBackground <PushNotificationBackgroundTaskProcessor>(
             builder => builder.SetTrigger(new PushNotificationTrigger())
             );
         if (this.CurrentRegistrationExpiryDate != null)
         {
             await this.RequestAccess();
         }
     }
     catch (Exception ex)
     {
         this.logger.LogError(ex, "Unable to register push");
     }
 }
Пример #4
0
 protected override void CancelNative(JobInfo jobInfo)
 => UwpPlatform.RemoveBackgroundTask(ToJobTaskName(jobInfo));