internal NotificationManager(IToastOptions options) { this.options = options ?? throw new ArgumentNullException(nameof(options)); this.snackbarExtension = typeof(ISnackbarExtension); this.notificationExtension = typeof(IDroidNotificationExtension); this.androidNotificationManager = NewAndroidNotificationManager(); this.systemEventSource = new SystemEventSource(null); this.intentManager = new IntentManager(options, androidNotificationManager, systemEventSource, null); this.history = new History(intentManager, androidNotificationManager); }
internal NotificationManager(IToastOptions options, IPermission permission) { this.notificationExtension = typeof(IIosNotificationExtension); this.localNotificationExtension = typeof(IIosLocalNotificationExtension); this.options = options; this.systemEventSource = new SystemEventSource(null); this.notificationReceiver = new NotificationReceiver(systemEventSource); this.permission = permission; this.history = new History(); }
public IntentManager( IToastOptions options, IAndroidNotificationManager androidNotificationManager, ISystemEventSource systemEventSource, IServiceProvider?serviceProvider) { this.mutex = new object(); this.tasksByNotificationId = new Dictionary <ToastId, TaskCompletionSource <NotificationResult> >(); this.options = options ?? throw new ArgumentNullException(nameof(options)); this.androidNotificationManager = androidNotificationManager; this.systemEventSource = systemEventSource; this.logger = serviceProvider?.GetService <ILogger <IntentManager> >(); this.intentFilter = new IntentFilter(); this.receiver = new NotificationReceiver(this); intentFilter.AddAction(IntentConstants.KTapped); intentFilter.AddAction(IntentConstants.KDismissed); intentFilter.AddAction(IntentConstants.KScheduled); Application.Context.RegisterReceiver(receiver, intentFilter); }
public NotificationEventProxy(ISystemEventSource systemEventRouter) { this.systemEventRouter = systemEventRouter; systemEventRouter.Subscribe(this); }
internal NotificationManager(IToastOptions options) { this.options = options ?? throw new ArgumentNullException(nameof(options)); this.systemEventSource = new SystemEventSource(null); this.history = new History(); }
public NotificationReceiver(ISystemEventSource systemEventSource) { requests = new Dictionary <ToastId, Request>(); UNUserNotificationCenter.Current.Delegate = this; this.systemEventSource = systemEventSource; }