示例#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));