单击通知时阻止 UWP 应用程序打开
Prevent UWP app opening when notification is clicked
我正在构建一个 UWP 应用程序,它通过 Azure 上的通知中心接收通知。我的代码基本上是这样的 tutorial here,它运行良好。我只需要在用户单击通知时停止打开 UWP 应用程序,实际上什么也不做。我该怎么做,我在网上找不到适合我的直接答案?
Prevent UWP app opening when notification is clicked
当您点击 toast 时,它会默认启动该应用程序。但是,我们可以指定操作按钮并将 ToastActivationType
设置为 Background
或直接设置 toast activationType="background"
。当您单击该按钮时,它将启动后台而不是应用程序。更多请参考handling-background-activation
我正在构建一个 UWP 应用程序,它通过 Azure 上的通知中心接收通知。我的代码基本上是这样的 tutorial here,它运行良好。我只需要在用户单击通知时停止打开 UWP 应用程序,实际上什么也不做。我该怎么做,我在网上找不到适合我的直接答案?
Prevent UWP app opening when notification is clicked
当您点击 toast 时,它会默认启动该应用程序。但是,我们可以指定操作按钮并将 ToastActivationType
设置为 Background
或直接设置 toast activationType="background"
。当您单击该按钮时,它将启动后台而不是应用程序。更多请参考handling-background-activation