问题描述
我无法从后台任务"更新手动固定的图块.
I cannot update manually pinned tile from Background Task.
var updater = TileUpdateManager.CreateTileUpdaterForApplication();
updater.EnableNotificationQueue(true);
updater.Clear();
XmlDocument tileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideText03);
var title = "Test text";
string titleText = title == null ? String.Empty : title;
tileXml.GetElementsByTagName("text")[0].InnerText = titleText;
updater.Update(new TileNotification(tileXml));
CreateTileUpdaterForApplication()上引发异常;并显示消息:提供的应用程序标识符无效.
Exception fires on CreateTileUpdaterForApplication(); with message: The application identifier provided is invalid.
我听说Windows Phone 8.1更新会出现此问题,但是我没有找到任何解决方案...请帮助.
I heard what this problem occurs on Windows Phone with 8.1 update, but I not found any solutions... Please help.
推荐答案
我遇到了完全相同的问题.经过三个小时的研究(浪费时间:/),我找到了解决方案:
I was having exactly the same issue. After three hours of research (damn waste of time :/) I found the solution:
var updater = TileUpdateManager.CreateTileUpdaterForApplication("App");
感谢发布该内容的人( http://social.msdn.microsoft.com/Forums/windowsapps/en-US/83498107-fe0d-4a8b-93f3-02d484983953/tileupdatemanager-throws-exception?forum= wpdevelop )!将鼠标悬停在通话-.-
Thanks to the guy who posted that (http://social.msdn.microsoft.com/Forums/windowsapps/en-US/83498107-fe0d-4a8b-93f3-02d484983953/tileupdatemanager-throws-exception?forum=wpdevelop)!Cannot believe that I did not see the "(+1 overload(s))" when hovering the mouse over the call -.-
这篇关于从后台任务WP8.1更新LiveTile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!