0
我想添加周期性的磁贴更新到我的Windows应用商店,如果我向tileUpdateManager提供了一个xml,例如这个地址http://wowzappelsalvador.azurewebsites.net/tiletest.xml,那么一切正常。 该应用程序可与蔚蓝的移动业务和想法是已经在App瓷砖使用相同的服务更新,所以我创造这样在Azure上读脚本:如何设置天蓝色的移动服务提供定期更新到Windows 8(商店)应用程序?
function read(query, user, request) {
mssql.query("select imagenTile, nombreTip from verdetips.tipDiaLiveTileView", {
success: function(results) {
var xmlEscape = function (text) {
return text.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"');
}
var payload = "<?xml version='1.0' encoding='UTF-8'?>" +
"<tile><visual><binding template='TileWideImageAndText01'>" +
"<image id='1' src='" + xmlEscape(results[0].imagenTile) + "' alt='Verde Tips'/>" +
"<text id='1'>" + xmlEscape(results[0].nombreTip) + "</text>" +
"</binding>" +
"<binding template='TileSquareText04'>" +
"<text id='1'>" + xmlEscape(results[0].nombreTip) + "</text>" +
"</binding></visual></tile>";
console.log(payload);
request.respond(statusCodes.OK, payload);
}
});
}
当我打电话与该脚本关联的表我得到与.xml文件相同的文本,但在.json文件上,并且更新不起作用,我错过了什么?
注:我已经看到了一些网站解释如何使用push.wns.send在Azure移动服务发送推送或Toast通知,但我的情况是一个调查的通知,客户端代码如下:
var notifications = Windows.UI.Notifications;
var polledUri = new Windows.Foundation.Uri("http://verdetips.azure-mobile.net/tables/tipDiaLiveTile");
//var polledUri = new Windows.Foundation.Uri("http://wowzappelsalvador.azurewebsites.net/tiletest.xml");
var recurrence = notifications.PeriodicUpdateRecurrence.daily;
var tileUpdater = notifications.TileUpdateManager.createTileUpdaterForApplication();
tileUpdater.startPeriodicUpdate(polledUri, recurrence);
任何帮助将不胜感激!
它看起来像他们试图建立一个平铺更新,这是通过移动服务中的推送通知对象来完成的,对吗? –
我看到了,很高兴知道它在路线图中,@PatrickGodwin是的,平铺更新正是应用程序需要的,通常您会为平铺设置一个包含xml的url并让应用程序每隔xx时间检查一次。 ..但考虑到应用程序使用移动服务,我想使用它...如果我想要使用现有的移动服务,每天发送一个推送通知给每个安装的应用程序都会诀窍吗? –