我正在尝试使用具有 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);
任何帮助或指导将不胜感激。谢谢。