public void Start() { if (this.services.Services.GetService(typeof(INotificationDelegate)) != null) { //ToastNotificationManagerCompat.OnActivated += null; UwpPlatform.RegisterBackground <NotificationBackgroundTaskProcessor>( builder => builder.SetTrigger(new ToastNotificationActionTrigger()) ); } }
public void Start() { UwpPlatform.RegisterBackground <PushNotificationBackgroundTaskProcessor>( builder => builder.SetTrigger(new PushNotificationTrigger()) ); if (this.CurrentRegistrationExpiryDate != null) { this.RequestAccess(); } }
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"); } }
protected override void CancelNative(JobInfo jobInfo) => UwpPlatform.RemoveBackgroundTask(ToJobTaskName(jobInfo));