Click here to Skip to main content
11,805,604 members (51,004 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Mobile Azure WinRT
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!
Posted 13-Jan-13 10:42am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


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 /

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

  Print Answers RSS
0 OriginalGriff 3,265
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web03 | 2.8.151002.1 | Last Updated 24 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100