Azure Notification Hub in UWP -
i toast notification azure notification hub uwp application asp.net website when click in notification opens app , suspend in splash screen close , how fix problem ??
i use tutorial : https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-windows-store-dotnet-get-started-wns-push-notification
when click in notification opens app , suspend in splash screen close immediately
frequently, onlaunched invoked when uwp application launched , method initial created. if want launch app toast activationkind toastnotification, may need handle activated event overriding onactivated event handle. example:
protected override void onactivated(iactivatedeventargs args) { if (args.kind == activationkind.toastnotification) { protocolactivatedeventargs eventargs = args protocolactivatedeventargs; // todo: handle uri activation // received uri eventargs.uri.absoluteuri var rootframe = createrootframe(); rootframe.navigate(typeof(mainpage)); window.current.activate(); } } more details please reference handle uri activation , notification official sample.
Comments
Post a Comment