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.

Selecting an item on the Start screen also invokes the app bar, shown in Figure 13-4, which offers<br />

commands to unpin a tile from the Start screen, uninstall the app, change the tile size (as we’ve seen),<br />

and turn off updates for a particular live tile.<br />

FIGURE 13-4 The app bar for the Start screen when a tile is selected. The Turn Live Tile Off command will disable<br />

updates for a given tile, so be careful not to annoy your customers with too much noise!<br />

Tiles can receive updates even when the app isn’t running, as we’ll see in the next section, “The Four<br />

Sources of Updates and Notifications.” Tiles can also cycle through up to five updates, an important<br />

feature that reduces the overall number of updates that actually need to be retrieved from the Internet<br />

(thus using less power). That is, by cycling through different updates a tile will continue to appear alive<br />

even though it is only receiving new updates in a timeframe of 5–15 minutes instead of 5–15 seconds.<br />

Tip Even though live tiles can be updated frequently through push notifications, be careful not to<br />

abuse that right. Think of live tiles as views into app content rather than gadgets: avoid trying to make a<br />

live tile an app experience unto itself (like a clock) because you cannot rely on high-frequency updates.<br />

Furthermore, a tile update consists only of XML that defines the tile content—updates cannot trigger<br />

the execution of any code. In the end, think about the real experience you want to deliver through your<br />

live tile and use the longest update period you can that will still achieve that goal.<br />

In the introduction I mentioned how acquiring more apps from the Windows Store is a way that the<br />

Start screen becomes increasingly richer. But new apps are not the only way that more tiles might<br />

appear. Apps can also create secondary tiles with all the capabilities of the app tile. Secondary tiles are<br />

essentially ways to create bookmarks into views of an app. A secondary tile is typically created through a<br />

Pin command on the app bar. Upon the app’s request to create the tile, Windows automatically<br />

prompts the user for confirmation as shown for the Weather app in Figure 13-5, thus always keeping<br />

the user in control of their Start screen (that is, apps cannot become litterbugs on that real estate!). In<br />

this case the Weather app lets you pin secondary tiles for each location you’ve configured; the<br />

secondary tile always includes specific information that is given back to the app when it’s launched,<br />

allowing it to navigate to the appropriate page.<br />

561

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

Saved successfully!

Ooh no, something went wrong!