【发布时间】:2014-10-07 03:35:04
【问题描述】:
我正在尝试使用具有 Azure 服务总线功能的 C# Winforms 应用程序向我的 WP8 应用程序发送磁贴通知。我已经使用所需的频道设置了应用程序,并且成功地能够向应用程序发送 toast 通知。但是,已证明磁贴通知更加困难。我一直在尝试使用 XML 以相同的方式发送它们,但我不确定为什么它在我的应用程序上不起作用。我的应用程序使用channel.BindToShellTile(); 以及其他通道逻辑,但我认为问题不存在,因为我能够通过同一个通道接收 toast。我目前正在尝试发送这个:
string tile = "<?xml version=\"1.0\"?>" +
"<wp:Notification xmlns:wp=\"WPNotification\" Version=\"2.0\">" +
"<wp:Tile Template=\"FlipTile\">" +
"<wp:BackgroundImage Action=\"Clear\">" + "red.png" + "</wp:BackgroundImage>" +
"<wp:Count Action=\"Clear\">" + "1" + "</wp:Count>" +
"<wp:Title Action=\"Clear\">" + "SENDPUSH" + "</wp:Title>" +
"<wp:BackBackgroundImage Action=\"Clear\">" + "blue.png" + "</wp:BackBackgroundImage>" +
"<wp:BackTitle Action=\"Clear\">" + "BackTitle" + "</wp:BackTitle>" +
"<wp:BackContent Action=\"Clear\">" + "Welcome Back!" + "</wp:BackContent>" +
"</wp:Tile>" +
"</wp:Notification>";
并使用以下方式发送:
hub.SendMpnsNativeNotificationAsync(tile);
任何帮助或指导将不胜感激。谢谢。
【问题讨论】:
标签: windows-phone-8 push-notification azure-notificationhub