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.

In many ways, live tiles might reduce the need for a user to ever launch the app that’s associated with a<br />

tile. Yet this isn’t really the case. Because tiles are limited in size and must adhere to predefined<br />

configurations (templates), they simultaneously provide essential details while serving as teasers. They<br />

give you enough useful information for an at-a-glance view but not so much that your appetite for details<br />

is fully satisfied. Instead of being a deterrent to starting apps, they’re actually an invitation: they both<br />

inform and engage. For this reason, I suspect that live tiles will be considered an essential app feature<br />

where they are appropriate and that apps that should provide them but don’t will see lower ratings in the<br />

Windows Store.<br />

I encourage you to be creative in thinking about what kinds of interesting information you might<br />

surface on a tile, even if your app doesn’t have anything to do with the Internet. Games, for example, can<br />

cycle through tile updates that show progress on various levels, high scores, new challenges, and so<br />

forth—all of which invite the user to re-engage with that app. Do remember, though, that the user can<br />

always disable updates for any given tile, so don’t give them a reason to defeat your purpose altogether!<br />

As additional background on live tiles, check out the Updating live tiles without draining your battery<br />

post on the Building Windows 8 blog. It’s good background on the system’s view of efficiently<br />

managing tiles.<br />

Now, for all the excellence of live tiles, the Start screen isn’t actually where users will be spending the<br />

majority of their time—we expect them, of course, to mostly be engaged in apps themselves. Even so,<br />

users may want to be notified when important events occur, such as the arrival of an email, the<br />

triggering of an alarm, or perhaps a change in traffic conditions that indicates a good time to head<br />

home for the day (or a change in weather conditions that indicates a great time to go out skiing!).<br />

For this purpose—surfacing typically time-sensitive information from apps that aren’t in the<br />

foreground—Windows 8 provides toast notifications. These transient messages pop up (like real toast<br />

but without the bread crumbs) in the upper right corner of the screen (upper left in right-to-left<br />

languages). They appear on top of the foreground app as shown in Figure 13-6, as well as the Start<br />

screen and the desktop. Up to three toasts can appear at any one time, and each can be accompanied<br />

by a predefined sound, if desired.<br />

Toasts are, like tile updates, created using predefined templates and can be composed of images,<br />

text, and logos; they always use the originating app’s color scheme, as defined in that app’s manifest<br />

(the foreground text and Background color settings in the Application UI section).<br />

The purpose of toasts is, again, to give the user alerts and other time-sensitive information, but by<br />

default they appear only for a short time before disappearing. The default toast duration is five seconds,<br />

but this can be set to as long as five minutes in PC Settings > Ease of Access, as shown in Figure 13-7.<br />

Apps can create long-duration toasts that remain visible for 25 seconds or the Ease of Access setting,<br />

whichever is longer. Furthermore, apps can create a looping toast for events like a phone call or other<br />

situation where another human being might be waiting on the other end and it’s appropriate to keep<br />

the notification active for some time.<br />

563

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

Saved successfully!

Ooh no, something went wrong!