23.01.2018 Views

MICROSOFT_PRESS_EBOOK_PROGRAMMING_WINDOWS_8_APPS_WITH_HTML_CSS_AND_JAVASCRIPT_PDF

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Windows.UI.Notifications.BadgeUpdateManager.createBadgeUpdaterForApplication()<br />

.update(badge);<br />

or:<br />

Windows.UI.Notifications.BadgeUpdateManager.createBadgeUpdaterForSecondaryTile(<br />

"SecondaryTile.LiveTile").update(badge);<br />

And as with tiles, BadgeUpdater.clear removes the badge entirely, which is equivalent to sending an<br />

update with the value of none. That’s it.<br />

Beyond that, the BadgeUpdater class has just two additional methods, startPeriodicUpdate and<br />

stopPeriodicUpdate, which are also found on the TileUpdater class. And wouldn’t you know it? Periodic<br />

updates just so happen to be our next topic—yes, I planned it this way too!<br />

Sidebar: How Much Network Traffic for Tiles?<br />

Included with the many improvements to Task Manager for Windows 8 is the ability to track your<br />

app’s network traffic for tile updates. Run Task Manager, make sure you click More Details in the<br />

lower left, and then click the App History tab. Network traffic for tile updates is shown on the<br />

rightmost column. This number will typically be small, but it’s a metric you can monitor to see<br />

whether updates become excessive.<br />

589

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!