private async void InitOnlineServiceAsync() { try { var tileUpdater = Windows.UI.Notifications.TileUpdateManager.CreateTileUpdaterForApplication(); IReadOnlyList <ScheduledTileNotification> plannedUpdated = tileUpdater.GetScheduledTileNotifications(); tileUpdater.Clear(); for (int i = 0, len = plannedUpdated.Count; i < len; i++) { // The itemId value is the unique ScheduledTileNotification.Id assigned to the notification when it was created. tileUpdater.RemoveFromSchedule(plannedUpdated[i]); } //var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync(); //var hub = new NotificationHub("jpdictHub", "Endpoint=sb://jpdictnamespace.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=b7P3q6gSzqgLDiCIFOv8q62J7EUft7RQr3F6TEIfXMg="); //var result = await hub.RegisterNativeAsync(channel.Uri); //AppCenter.Configure("de248288-41ba-4ca6-b857-4bfaa6758c63"); StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); await engagementManager.RegisterNotificationChannelAsync(); AppCenter.Start("de248288-41ba-4ca6-b857-4bfaa6758c63", typeof(Analytics), typeof(Crashes), typeof(Push)); } catch { Debug.WriteLine("Registration failed"); } //// Displays the registration ID so you know it was successful //if (result.RegistrationId != null) //{ // var dialog = new MessageDialog("Registration successful: " + result.RegistrationId); // dialog.Commands.Add(new UICommand("OK")); // await dialog.ShowAsync(); //} }
private async Task RegisterCommunicationChannel() { if (!Settings.DisableNotifications) { StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); engagementManager.RegisterNotificationChannelAsync(); } }
private async void Example1() { //<RegisterNotificationChannelAsync1> StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); await engagementManager.RegisterNotificationChannelAsync(); //</RegisterNotificationChannelAsync1> }
private async void InitNotificationsAsync() { PushNotificationChannel pnc = null; Registration result = null; //try //{ // var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync(); // var hub = new NotificationHub("wnsTestHub", "Endpoint=sb://wnstest.servicebus.windows.net/;SharedAccessKeyName=DefaultListenSharedAccessSignature;SharedAccessKey=xxxxxxxxIM9oJOAEpekrKLCYGNnHtpjEULOLv01G0Sbi8="); // var res1 = await hub.RegisterNativeAsync(channel.Uri); // pnc = channel; // result = res1; //} //catch (Exception ex) //{ // Crashes.TrackError(ex); //} #if DEBUG // Displays the registration ID so you know it was successful //if (result != null) // if (result.RegistrationId != null) // { // var dialog = new MessageDialog("Notification Hub Registration successful: " + result.RegistrationId); // dialog.Commands.Add(new UICommand("OK")); // await dialog.ShowAsync(); // } #endif StoreServicesNotificationChannelRegistrationResult res = null; try { // Register with Partner Center engagement notifications StoreServicesNotificationChannelParameters parameters = new StoreServicesNotificationChannelParameters(); if (pnc != null) { parameters.CustomNotificationChannelUri = pnc.Uri; } StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); res = await engagementManager.RegisterNotificationChannelAsync(parameters); } catch (Exception ex) { Crashes.TrackError(ex); } #if DEBUG // Displays the registration ID so you know it was successful if (res.ErrorCode == StoreServicesEngagementErrorCode.None) { var dialog = new MessageDialog("Engagement Notificaiton Registration successful: " + res.ErrorMessage); dialog.Commands.Add(new UICommand("OK")); await dialog.ShowAsync(); } #endif }
public static IAsyncOperation <int> Init() { return(Task.Run(async() => { StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); var res = await engagementManager.RegisterNotificationChannelAsync(); return (int)res.ErrorCode; }).AsAsyncOperation()); }
protected async override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); await engagementManager.RegisterNotificationChannelAsync(); FindDeviceD(); //FindDeviceLe(); }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; AppCenter.Start("d822e171-9f7e-4efb-866a-2e53a641aa7d", typeof(Analytics), typeof(Crashes), typeof(Push)); StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); engagementManager.RegisterNotificationChannelAsync(); }
protected override async void OnLaunched(LaunchActivatedEventArgs args) { if (!args.PrelaunchActivated) { await ActivationService.ActivateAsync(args); } //Per ricevere nell'app notifiche che invio dal Dashboard https://docs.microsoft.com/it-it/windows/uwp/publish/send-push-notifications-to-your-apps-customers //Eseguire la registrazione per le notifiche push StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); await engagementManager.RegisterNotificationChannelAsync(); }
private async void Example2() { //<RegisterNotificationChannelAsync2> StoreServicesNotificationChannelParameters parameters = new StoreServicesNotificationChannelParameters(); parameters.CustomNotificationChannelUri = "Assign your channel URI here"; StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); await engagementManager.RegisterNotificationChannelAsync(parameters); //</RegisterNotificationChannelAsync2> }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected override void OnLaunched(LaunchActivatedEventArgs e) { PrepareAppWindow(); // Register for Targeted notifications StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); _ = engagementManager.RegisterNotificationChannelAsync(); Frame rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = rootFrame; } if (e.PrelaunchActivated == false) { if (rootFrame.Content == null) { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter rootFrame.Navigate(typeof(MainPage), e.Arguments); } // Ensure the current window is active Window.Current.Activate(); } }
public override async Task OnStartAsync(StartKind startKind, IActivatedEventArgs args) { // await Task.Delay(4); try { StorageFile vcdStorageFile = await Package.Current.InstalledLocation.GetFileAsync(@"HomeControlCommands.xml"); await VoiceCommandDefinitionManager.InstallCommandDefinitionsFromStorageFileAsync(vcdStorageFile); } catch { // System.Diagnostics.Debug.WriteLine("There was an error registering the Voice Command Definitions", ex); } StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); await engagementManager.RegisterNotificationChannelAsync(); // TODO: add your long-running task here // await Windows.Storage.ApplicationData.Current.ClearAsync(); IPropertySet roamingProperties = ApplicationData.Current.RoamingSettings.Values; if (roamingProperties.ContainsKey("HasBeenHereBefore")) { // The normal case await NavigationService.NavigateAsync(typeof(Views.MainPage)); } else { // The first-time case Shell.HamburgerMenu.IsFullScreen = true; await NavigationService.NavigateAsync(typeof(Views.HelpPage)); var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; localSettings.Values["oneshot"] = "true"; roamingProperties["HasBeenHereBefore"] = bool.TrueString; // Doesn't really matter what } }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected async override void OnLaunched(LaunchActivatedEventArgs e) { bool canEnablePrelaunch = Windows.Foundation.Metadata.ApiInformation.IsMethodPresent("Windows.ApplicationModel.Core.CoreApplication", "EnablePrelaunch"); if (e != null) { if (e.PreviousExecutionState == ApplicationExecutionState.Running) { Window.Current.Activate(); return; } } Helper.ChangeAppMinSize(540, 744); try { //StoreServicesNotificationChannelParameters parameters = // new StoreServicesNotificationChannelParameters(); //parameters.CustomNotificationChannelUri = "Assign your channel URI here"; //StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); //await engagementManager.RegisterNotificationChannelAsync(parameters); await Helper.RunInBackground(async() => { StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); await engagementManager.RegisterNotificationChannelAsync(); }); } catch { // } // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (!(Window.Current.Content is Frame rootFrame)) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = CreateRootFrame(); rootFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } if (e.PreviousExecutionState != ApplicationExecutionState.Running) { bool loadState = (e.PreviousExecutionState == ApplicationExecutionState.Terminated); SplashView extendedSplash = new SplashView(e.SplashScreen, loadState); rootFrame.Content = extendedSplash; //rootFrame.Content = new Views.BlankPage1(); Window.Current.Content = rootFrame; } // Place the frame in the current Window Window.Current.Content = rootFrame; } if (e.PrelaunchActivated == false) { if (canEnablePrelaunch) { TryEnablePrelaunch(); } if (rootFrame.Content == null) { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter rootFrame.Navigate(typeof(MainPage), e.Arguments); } // Ensure the current window is active Window.Current.Activate(); } }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected async override void OnLaunched(LaunchActivatedEventArgs e) { InstallCommandDefinitionsFromStorageFileAsync(); StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); engagementManager.RegisterNotificationChannelAsync(); await BackgroundExecutionManager.RequestAccessAsync(); unregisterBackgroundTasks(); var backgroundTask = RegisterBackgroundTask("tasks.Class1", "Class1", new TimeTrigger(1440, false), new SystemCondition(SystemConditionType.UserNotPresent)); var appView = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView(); setLaunchViewSize(appView); setMinAppSize(appView); if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar")) { var statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView(); statusBar.BackgroundOpacity = 1; statusBar.ForegroundColor = ((SolidColorBrush)Application.Current.Resources["SystemControlForegroundAccentBrush"]).Color; statusBar.BackgroundColor = ((SolidColorBrush)Application.Current.Resources["SystemControlBackgroundChromeMediumLowBrush"]).Color; } var qualifiers = Windows.ApplicationModel.Resources.Core.ResourceContext.GetForCurrentView().QualifierValues; if (qualifiers.ContainsKey("DeviceFamily") && qualifiers["DeviceFamily"] == "Desktop") { var accentColorBrush = new SolidColorBrush((Color)Application.Current.Resources["SystemAccentColor"]).Color; ApplicationViewTitleBar formattableTitleBar = appView.TitleBar; formattableTitleBar.ButtonBackgroundColor = Colors.Transparent; formattableTitleBar.ButtonInactiveBackgroundColor = Colors.Transparent; formattableTitleBar.ButtonForegroundColor = accentColorBrush; CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar; coreTitleBar.ExtendViewIntoTitleBar = true; appView.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow); } Frame rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; //rootFrame.Navigated += OnNavigated; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = rootFrame; // Register a handler for BackRequested events and set the // visibility of the Back button //SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested; //SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = // rootFrame.CanGoBack ? // AppViewBackButtonVisibility.Visible : // AppViewBackButtonVisibility.Collapsed; } if (e.PrelaunchActivated == false) { var activationKind = e.Kind; if (rootFrame.Content == null) { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter PackageVersion pv = Package.Current.Id.Version; object currentAppVersion = localSettings.Values["currentAppVersion"]; NavService = new Navigation(ref rootFrame); string applicationVersion = $"{pv.Major}.{pv.Minor}.{pv.Build}.{pv.Revision}"; prepareForTheCheckAndAskForReviewsAlgorithm(); if (currentAppVersion == null) { //Uncomment currentAppVersion change when you finish with testing onBoardingPage //localSettings.Values["currentAppVersion"] = applicationVersion; //When you finish the onBoardingPage, show it instead of the whatsNewPage App.NavService.NavigateTo(typeof(onBoardingPage), applicationVersion); } else if (currentAppVersion.ToString() != applicationVersion) { logger.Log($"Users updated to app version: {applicationVersion}"); localSettings.Values["currentAppVersion"] = applicationVersion; //Bring back the whatsNewPage for users who update at the end of your exams when you are officially back! //rootFrame.Navigate(typeof(whatsNewPage)); rootFrame.Navigate(typeof(whatsNewPage), e.Arguments); } else { if (!string.IsNullOrEmpty(e.Arguments)) { string tileID = e.Arguments; navigateBasedOnTileID(tileID, rootFrame); } else if (e.TileId != "") { if (e.TileId != "App") { navigateBasedOnTileID(e.TileId, rootFrame); } else { App.NavService.NavigateTo(typeof(MainPage), e.Arguments); } } else { App.NavService.NavigateTo(typeof(MainPage), e.Arguments); } } } else if (!string.IsNullOrEmpty(e.Arguments) && (string)e.Arguments == "Args") { string tileID = e.Arguments; navigateBasedOnTileID(tileID, rootFrame); } else { if (e.TileId != "") { if (e.TileId != "App") { navigateBasedOnTileID(e.TileId, rootFrame); } else { App.NavService.NavigateTo(typeof(MainPage), e.Arguments); } } } // Ensure the current window is active Window.Current.Activate(); } }
protected async override void OnActivated(IActivatedEventArgs e) { // Get the root frame Frame rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; //rootFrame.Navigated += OnNavigated; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = rootFrame; StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); engagementManager.RegisterNotificationChannelAsync(); await BackgroundExecutionManager.RequestAccessAsync(); unregisterBackgroundTasks(); var backgroundTask = RegisterBackgroundTask("tasks.Class1", "Class1", new TimeTrigger(1440, false), new SystemCondition(SystemConditionType.UserNotPresent)); var appView = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView(); setLaunchViewSize(appView); setMinAppSize(appView); if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar")) { var statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView(); statusBar.BackgroundOpacity = 1; statusBar.ForegroundColor = ((SolidColorBrush)Application.Current.Resources["SystemControlForegroundAccentBrush"]).Color; statusBar.BackgroundColor = ((SolidColorBrush)Application.Current.Resources["SystemControlBackgroundChromeMediumLowBrush"]).Color; } var qualifiers = Windows.ApplicationModel.Resources.Core.ResourceContext.GetForCurrentView().QualifierValues; if (qualifiers.ContainsKey("DeviceFamily") && qualifiers["DeviceFamily"] == "Desktop") { var accentColorBrush = new SolidColorBrush((Color)Application.Current.Resources["SystemAccentColor"]).Color; ApplicationViewTitleBar formattableTitleBar = appView.TitleBar; formattableTitleBar.ButtonBackgroundColor = Colors.Transparent; formattableTitleBar.ButtonInactiveBackgroundColor = Colors.Transparent; formattableTitleBar.ButtonForegroundColor = accentColorBrush; CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar; coreTitleBar.ExtendViewIntoTitleBar = true; appView.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow); } } if (rootFrame.Content == null) { NavService = new Navigation(ref rootFrame); } // Handle toast activation if (e is ToastNotificationActivatedEventArgs) { var toastActivationArgs = e as ToastNotificationActivatedEventArgs; // Parse the query string string args = toastActivationArgs.Argument; // See what action is being requested if (args == "comeBack" || args == "Yes") { logger.Log("Launched app from encouraging toast"); App.NavService.NavigateTo(typeof(MainPage), "comeBack"); } } // TODO: Handle other types of activation if (e.Kind == ActivationKind.VoiceCommand) { // Event args can represent many different activation types. // Cast it so we can get the parameters we care about out. var commandArgs = e as VoiceCommandActivatedEventArgs; Windows.Media.SpeechRecognition.SpeechRecognitionResult speechRecognitionResult = commandArgs.Result; // Get the name of the voice command and the text spoken. // See VoiceCommands.xml for supported voice commands. string voiceCommandName = speechRecognitionResult.RulePath[0]; string textSpoken = speechRecognitionResult.Text; // commandMode indicates whether the command was entered using speech or text. // Apps should respect text mode by providing silent (text) feedback. string commandMode = this.SemanticInterpretation("commandMode", speechRecognitionResult); switch (voiceCommandName) { case "createNewGoal": const string nullValue = "(null)"; string goalName = this.SemanticInterpretation("goalName", speechRecognitionResult); string target = this.SemanticInterpretation("target", speechRecognitionResult); string[] goalDetails = new string[] { goalName, target }; // Create a navigation command object to pass to the page. NavService.NavigateTo(typeof(addNewGoalPage), goalDetails); if (rootFrame.BackStackDepth > 0) { if (rootFrame.BackStack.Last().SourcePageType != typeof(MainPage)) { int backStackSize = rootFrame.BackStackDepth; rootFrame.BackStack.RemoveAt(backStackSize - 1); } } break; case "showGoalInProgress": goalName = this.SemanticInterpretation("goalInProgress", speechRecognitionResult); try { int itemCount = goal.listOfGoals.Where(item => item.name == goalName).Count(); if (itemCount > 0) { var goalInContext = goal.listOfGoals.Where(item => item.name == goalName).First(); NavService.NavigateTo(typeof(selectedGoalPage), goalInContext); } } catch (Exception) { NavService.NavigateTo(typeof(MainPage), "cortanaFailed"); } break; default: NavService.NavigateTo(typeof(MainPage), "cortanaFailed"); break; } } // Ensure the current window is active Window.Current.Activate(); }
public async Task InitializeAsync() { StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); await engagementManager.RegisterNotificationChannelAsync(); }
private async void RegisterEngagementNotification() { StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); await engagementManager.RegisterNotificationChannelAsync(); }
public async void SetupStoreServices() { StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); await engagementManager.RegisterNotificationChannelAsync(); }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name = "e">Details about the launch request and process.</param> protected override async void OnLaunched(LaunchActivatedEventArgs e) { if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.ApplicationView")) { var titleBar = ApplicationView.GetForCurrentView().TitleBar; if (titleBar != null) { titleBar.ButtonBackgroundColor = (Application.Current.Resources["splitwiseGreen"] as SolidColorBrush).Color; titleBar.ButtonHoverBackgroundColor = (Application.Current.Resources["splitwiseGreenHover"] as SolidColorBrush).Color; titleBar.ButtonPressedBackgroundColor = (Application.Current.Resources["splitwiseGreenPressed"] as SolidColorBrush).Color; titleBar.ButtonForegroundColor = Colors.White; titleBar.BackgroundColor = (Application.Current.Resources["splitwiseGreen"] as SolidColorBrush).Color; ; titleBar.ForegroundColor = Colors.White; titleBar.InactiveBackgroundColor = (Application.Current.Resources["splitwiseGreen"] as SolidColorBrush).Color; titleBar.InactiveForegroundColor = Colors.White; titleBar.ButtonInactiveBackgroundColor = (Application.Current.Resources["splitwiseGreen"] as SolidColorBrush).Color; titleBar.ButtonInactiveForegroundColor = Colors.White; } } //Mobile customization if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar")) { var statusBar = StatusBar.GetForCurrentView(); if (statusBar != null) { statusBar.BackgroundOpacity = 1; statusBar.BackgroundColor = (Application.Current.Resources["splitwiseGreen"] as SolidColorBrush).Color; statusBar.ForegroundColor = Colors.White; } } Advertisement.UpdateInAppPurchases(); //#if DEBUG // if (System.Diagnostics.Debugger.IsAttached) // { // this.DebugSettings.EnableFrameRateCounter = true; // } //#endif Helpers dbHelper = new Helpers(); dbHelper.CreateDatabase(); rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { App.accessToken = Helpers.AccessToken; App.accessTokenSecret = Helpers.AccessTokenSecret; // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter if (ApplicationData.Current.LocalSettings.Values[Constants.ACCESS_TOKEN_TAG] != null && ApplicationData.Current.LocalSettings.Values[Constants.ACCESS_TOKEN_SECRET_TAG] != null) { rootFrame.Navigate(typeof(MainPage), false); } else { rootFrame.Navigate(typeof(LoginPage), e.Arguments); } } // Ensure the current window is active Window.Current.Activate(); StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); await engagementManager.RegisterNotificationChannelAsync(); }
private async Task RegisterForDevCenterNotifcationsAsync() { StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault(); await engagementManager.RegisterNotificationChannelAsync(); }