0

我有一个地铁应用程序,正在实现推送通知概念。在这里我想在我的应用程序安装时将频道 URI 发送到我的服务器,所以在哪种情况下我需要获取频道 URI,在哪种情况下我需要将此 URI 发送到服务器。实际上,在这里我观察到频道 URI 仅在我们卸载应用程序并重新安装时才会变化。否则它将保持不变。谁能建议我需要使用哪些事件,这里使用的是 HTML5 和 WinJS?

谢谢你。

4

1 回答 1

0

A new push notification channel URI isn't always created when the channel API is called. The CreatePushNotificationChannelForApplicationAsync method will return a cached local copy of the channel URI for a period of time (currently 24 hours).

The how-to article on MSDN provides guidance about channel management summarized here:

  • Whenever the app is run, request a new channel.
  • If the new channel URI is different from the old channel URI:
    • Replace the channel URI on the service with the new channel URI.
    • Once your service has the channel, store the new channel URI for future comparisons.
于 2012-10-11T14:19:36.783 回答