我用手机来推动动态磁贴更新本身,但是我收到的错误:直播瓷砖频道推错误“MessageBadContent”
{} Microsoft.Phone.Notification.NotificationChannelErrorEventArgs
“ MessageBadContent”
错误码= -2129589899
我有一种感觉,这是因为我在乌里发送用于图块的网址太长。
有其他人有这个问题吗?
代码发送更新:
HttpNotificationChannel channel = HttpNotificationChannel.Find("OneTime");
if (channel != null)
channel.Close();
else
{
channel = new HttpNotificationChannel("OneTime");
channel.ChannelUriUpdated +=
(s, e) =>
{
if (imageUri.IsAbsoluteUri)
{
channel.BindToShellTile(new Collection<Uri> {new Uri("http://mydomain.com") });
}
else
channel.BindToShellTile();
SendTile(e.ChannelUri, imageUri.ToString(), 0, " ",
() =>
{
//Give it some time to let the update propagate
Thread.Sleep(
TimeSpan.FromSeconds(10));
channel.UnbindToShellTile();
channel.Close();
//Do the operation
if (onComplete != null)
onComplete();
}
);
};
channel.Open();
}
}
在我发送包的XML是:
<?xml version="1.0" encoding="utf-8" ?>
<wp:Notification xmlns:wp="WPNotification">
<wp:Tile>
<wp:BackgroundImage>http://mydomain.com/t/k/DQAAALcAAADLhwtLmfIY_JXVhUMA4vYEemvu9dlf-rK8_SbiCGdWPyABXu1MqmZePHf5q9KHfL5J24qvWEgc6EgfparQKQCHsn938r357YSY_uci8DU3XUSg_v9HI3Kbbwmxrr6I97QpD99RfEOxwa6KhZiFTlMLLswh8HDRhlJbe-h10p40SnylDumQRhxqiRYbB3sHYPekrVyS8gJf9opaoQ-dIV1PAtKqc_WdrU37pWYHhwjKJ-QV7d0JrQ9sONEr6VitSRc/s/21556645/p/3</wp:BackgroundImage>
<wp:Count>0</wp:Count>
<wp:Title />
</wp:Tile>
</wp:Notification>
你尝试使用较小的文件名排除这一点? – 2011-03-04 10:39:54
我有,它的工作原理 - 这就是为什么我想知道我做错了什么。我的有效载荷是500个奇数字节(低于1024作为限制)。为什么实时更新磁贴网址有这么短的限制(我的上面只有大约300个字符,并不那么庞大) – Doug 2011-03-04 10:58:54