private static void FireNotificationReceivedEvent(NotificationInfoForRequesting args) { foreach (var item in ReceivedNotification) { item.Value.Invoke(args); } }
public static void OnNotificationReceivedInBGTask(NotificationInfoForRequesting args) { SharedLibs.JSONObjectSerializer <string> serializer = new SharedLibs.JSONObjectSerializer <string>(); string content = serializer.BytesToObject(args.NotificationPreviewContent); DotNetCoreLibs.ToastNotificationHelper.Show("New Notification received in BG", content); }
private async void RNAdapter_ReceivedNotification1(NotificationInfoForRequesting args) { JSONObjectSerializer <string> serializer = new JSONObjectSerializer <string>(); var content = serializer.BytesToObject(args.NotificationPreviewContent); await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { Messages.Add(new PreviewModel { Content = content, NotificationAccessKey = args.NotificationAccessKey, NotificationId = args.NotificationId }); NoNotificationVisibility = _Messages.Count > 0 ? Visibility.Collapsed : Visibility.Visible; }); }
public async Task AddNotificationAsync(NotificationInfoForRequesting entity) { await Notifications.Add(entity); }