在模拟器中更新应用程序磁贴时出现异常 [英] Exception when updating application tile in simulator
问题描述
在模拟器中运行应用程序时,调试控制台中会显示以下错误:
0x803e0102 - JavaScript运行时错误:提供的应用程序标识符无效。
:
var notification,tile,tileAttributes;
$
tile = TileUpdateManager.getTemplateContent(Notifications.TileTemplateType。 tileWideText03);
$
tileAttributes = tile.getElementsByTagName(" text");
$
tileAttributes [0] .appendChild(tile.createTextNode("" + count +") ; items"));
$
notification = new TileNotification(tile);
TileUpdateManager.createTileUpdaterForApplication()。update(notification); //异常
由于我无法在任何地方设置应用程序标识符,我认为我的应用程序安装错误导致错误?
我也觉得瓷砖更新并不总是在模拟器中工作
它可以在非模拟器环境中工作吗?如果您想针对调用应用更新磁贴,则不需要应用标识符。只有当您想要在同一个包中更新磁贴时,才需要使用此参数(应用标识符)。
请先卸载您的应用,然后参考
应用图块和徽章示例 构建从头开始新的应用程序进行测试。
The following error is printed in the debug console when running the app in the simulator:
0x803e0102 - JavaScript runtime error: The application identifier provided is invalid.
when this code is called:
var notification, tile, tileAttributes;
tile = TileUpdateManager.getTemplateContent(Notifications.TileTemplateType.tileWideText03);
tileAttributes = tile.getElementsByTagName("text");
tileAttributes[0].appendChild(tile.createTextNode("" + count + " items"));
notification = new TileNotification(tile);
TileUpdateManager.createTileUpdaterForApplication().update(notification); // Exception
Since I cannot set the application identifier anywhere, I guess its an error with a faulty installation of my app?
Hi,
Did it work in non-simulator environment? If you want to update tile against the calling app, app identifier is not needed. Only when you want to update the tile against another app within the same package, this parameter (app identifier) is needed.
Please first uninstall your app and then refer to App tiles and badges sample to build up a new app from scratch for test.
这篇关于在模拟器中更新应用程序磁贴时出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!