【发布时间】:2017-06-02 14:44:32
【问题描述】:
我正在按照本教程为 UWP 应用程序使用通知中心:Getting started with Notification Hubs for Windows Universal Platform Apps。
如果我使用 Windows 8 通知测试发送,例如:
<?xml version="1.0" encoding="utf-8"?>
<toast>
<visual><binding template="ToastText01">
<text id="1">Test message</text>
</binding>
</visual>
</toast>
它可以工作,如果我点击通知,它会通过 OnLaunched() 方法打开应用程序。但是,如果我发送 UWP 特定通知,例如:
<toast launch="app-defined-string">
<visual>
<binding template="ToastGeneric">
<text>Microsoft Company Store</text>
<text>New Halo game is back in stock!</text>
</binding>
</visual>
<actions>
<action activationType="foreground" content="See more details" arguments="details"/>
<action activationType="background" content="Remind me later" arguments="later"/>
</actions>
</toast>
toast 可以工作,但如果我点击它,它会打开应用程序并且 OnLaunched() 从未调用过,因此应用程序卡在了闪屏上。
提前感谢您的帮助,
问候
【问题讨论】:
标签: azure push-notification uwp