示例#1
0
 private static void FireNotificationReceivedEvent(NotificationInfoForRequesting args)
 {
     foreach (var item in ReceivedNotification)
     {
         item.Value.Invoke(args);
     }
 }
示例#2
0
        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);
        }
示例#3
0
        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;
            });
        }
示例#4
0
 public async Task AddNotificationAsync(NotificationInfoForRequesting entity)
 {
     await Notifications.Add(entity);
 }