I have an application framework (in JavaScript) which dynamically sets the URLs for the live tile feed. In my code I have something like below, and this works for a wide tile, but when I resize the tile to "medium" (or "small") the live feed/update is gone. If I resize back to wide it works just fine. There is no other tile setup (it uses the default).
My question is: is there anyway to update all tile sizes at the same time, or will I have to build a full XML object using getTemplateContent()
and the TileUpdater's update()
method?
I currently update the periodic URLs like so (again, this works for wide tiles):
var updater = Windows.UI.Notifications.TileUpdateManager.createTileUpdaterForApplication();
updater.clear();
updater.stopPeriodicUpdate();
updater.enableNotificationQueue(true);
updater.startPeriodicUpdateBatch(
[ new Windows.Foundation.Uri(feedUrlString) ],
Windows.UI.Notifications.PeriodicUpdateRecurrence.halfHour
);
To update multiple tile sizes in a single update, the XML payload for that update must contain individual elements for each tile size.
You can see this in the App tiles and badges sample in the SDK. Scenario 1, for instance, demonstrates how to do this using (a) the C# NotificationExtensions library, (b) building the XML as a string, and (c) using getTemplateContent. One of these methods should work for you.
To give an example for case (a), here's the code from scenario 1 that also has a comment explaining more: