protected override async void OnActivated(IActivatedEventArgs args) { // Handle case where user clicked the toast app header within Action Center (rarely happens), launch Game Pass if (args.Kind == ActivationKind.ToastNotification) { Window.Current.Activate(); await Launcher.LaunchUriAsync(new Uri(ToastHelper.GetProtocolUrl())); Application.Current.Exit(); } }
protected override async void OnActivated(IActivatedEventArgs args) { // Handle case where user clicked the toast app header within Action Center, launch Edge if (args.Kind == ActivationKind.ToastNotification) { Window.Current.Activate(); // This doesn't correctly bring Edge up with focus, but it at least launches Edge. // Alternatively could display a promo page with a "Launch Edge" button, which would correctly work. await Launcher.LaunchUriAsync(new Uri(ToastHelper.GetProtocolUrl())); Application.Current.Exit(); } }