For anyone that has been wondering what I’ve been doing in the past year, I’ve been working on some cool improvements for the WinRT File API. Yesterday the preliminary documentation was released and my awesome teammate Marc gave a talk at Build about the improvements, including API improvements, the new StorageLibrary API, and the integration with SkyDrive. The Build talk and a few more links are below.
Windows 8 apps can have notification badges in the tiles. It’s easy to update the badge, but it’s still not well documented, so here is a small snippet to show you how it’s done:
var Notifications = Windows.UI.Notifications; var updater = Notifications.BadgeUpdateManager.createBadgeUpdaterForApplication(); var xml = Notifications.BadgeUpdateManager.getTemplateContent( Notifications.BadgeTemplateType.badgeNumber ); xml.getElementsByTagName('badge').setAttribute('value', 5); var notification = Notifications.BadgeNotification(xml); updater.update(notification);
Replace the 5 in line 7 with the number of your choice. The end result looks like this: