Click here to Skip to main content
15,923,051 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I want to add periodic tile updates to my windows store App, everything works ok if I provide a xml to the tileUpdateManager like for example this address[^].
The app works with an azure mobile service and the idea is to have the App tile updated using the same service so I created a read script on azure like this:

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, '&lt;')
               .replace(/>/g, '&gt;')
               .replace(/"/g, '&quot;');

             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>" +

             request.respond(statusCodes.OK, payload);

when I call the table associated with this script I get the same text as on the .xml file but on a .json file and the tile update doesn't work, what am I missing?

Note: I've seen some sites explaining how to use push.wns.send on azure mobile services to send push or toast notifications but my case is a polled notification, client code as follows:

var notifications = Windows.UI.Notifications;
        var polledUri = new Windows.Foundation.Uri("");
        //var polledUri = new Windows.Foundation.Uri("");
        var recurrence = notifications.PeriodicUpdateRecurrence.daily;
        var tileUpdater = notifications.TileUpdateManager.createTileUpdaterForApplication();
        tileUpdater.startPeriodicUpdate(polledUri, recurrence);

Any help would be much appreciated!

1 solution


Here's a quick backgrounder on Azure Mobile Services and Windows 8 Store apps.[^]

Hope that helps.


// Frank La Vigne / US Public Sector Developer Evangelist
// 30 To Launch Sign up at
// @tableteer /
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900