protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            NotificationInputPara inputPara = (NotificationInputPara)e.Parameter;
            _viewModel = new NotificationViewModel(inputPara.Bl);
            grdMain.DataContext = _viewModel;

            _viewModel.LoadNotifications(); 

            base.OnNavigatedTo(e);
        }
Exemple #2
0
        private async void RegisterWithNotificationHub()
        {
            _NotificationHub = new NotificationHub("vidpack", "Endpoint=sb://vidpack-ns.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=<<InsertSharedAccessKeyHere>>");
            var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
            _ChannelUri = channel.Uri; 

            NotificationViewModel notificationViewModel = new NotificationViewModel(App._Bl);
            List<string> subscribedNotification = notificationViewModel.LoadSubscribedNotificationsLocal();

            await _NotificationHub.RegisterNativeAsync(_ChannelUri, subscribedNotification); 
            
        }