locked
Scheduled Tile Updates not showing

    Question

  • I've got a countdown app that schedules a local Live Tile update every 24 hours at midnight. During my debugging I logged the update creation to the console, so I know that they're being created. 

    Problem is the updates aren't actually showing. Can anyone see what's wrong with my code/solution?

        for (var i = 0; i <= DaysLeft; i++) {
            //badge content
            BadgeUpdate = DaysLeft - i + " Days Until Countdown!"
            var template = notifications.TileTemplateType.tileWide310x150ImageAndText01;
            var tileXml = notifications.TileUpdateManager.getTemplateContent(template);
            var tileTextAttributes = tileXml.getElementsByTagName("text");
            tileTextAttributes[0].appendChild(tileXml.createTextNode(BadgeUpdate));
            var tileImageAttributes = tileXml.getElementsByTagName("image");
            tileImageAttributes[0].setAttribute("src", "ms-appx:///images/Wide310x150Logo.scale-100.png");
            tileImageAttributes[0].setAttribute("alt", "Countdown");
            var squareTemplate = notifications.TileTemplateType.tileSquare150x150Text04;
            var squareTileXml = notifications.TileUpdateManager.getTemplateContent(squareTemplate);
            var squareTileTextAttributes = squareTileXml.getElementsByTagName("text");
            squareTileTextAttributes[0].appendChild(squareTileXml.createTextNode(BadgeUpdate));
            var node = tileXml.importNode(squareTileXml.getElementsByTagName("binding").item(0), true);
            tileXml.getElementsByTagName("visual").item(0).appendChild(node);
            // end badge update
    
            //startTime.setMinutes(startTime.getMinutes() + 1);
            startTime.setHours(24, 0, 0, 0) + i
            var scheduledTile = new notifications.ScheduledTileNotification(tileXml, startTime);
            scheduledTile.id = "Schedule_" + i
            var tileUpdateManager = Windows.UI.Notifications.TileUpdateManager;
            tileUpdateManager.createTileUpdaterForApplication().addToSchedule(scheduledTile);
            console.log(scheduledTile.id)
            console.log(scheduledTile.deliveryTime)
            console.log(scheduledTile.content.innerText)
        }

    Thursday, January 30, 2014 10:39 PM

Answers

  • I've pinged you internally.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, January 31, 2014 1:57 PM
    Moderator
  • Check if your app has permission to show tiles
    Saturday, February 1, 2014 6:27 PM
  • Hi Matts,

    I will close this thread because you already have the solution for this question. I'd like to share with public, if someone meet the same question, should get hint from this post.

    It's not an issue with the schedule, but an issue with the countdown number. The number being written is one behind what it should be, so when the midnight schedule hits, its writing the same number as the app launch… making us think the schedule isn't working!

    Thanks.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, February 7, 2014 2:36 AM
    Moderator

All replies

  • I've pinged you internally.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, January 31, 2014 1:57 PM
    Moderator
  • Check if your app has permission to show tiles
    Saturday, February 1, 2014 6:27 PM
  • Hi Matts,

    I will close this thread because you already have the solution for this question. I'd like to share with public, if someone meet the same question, should get hint from this post.

    It's not an issue with the schedule, but an issue with the countdown number. The number being written is one behind what it should be, so when the midnight schedule hits, its writing the same number as the app launch… making us think the schedule isn't working!

    Thanks.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, February 7, 2014 2:36 AM
    Moderator