Users only spend a limited amount of time in our apps; anything we developers can do to invite them back into our apps increases user engagement. One of the best tools for doing this in Windows Store apps are notifications such as toasts, tiles and badges. We can trigger timely and appropriate notifications from outside (mostly from a cloud service) for Windows Store app users, even when our app is not actively running. The goal for using things like live tiles, badge updates and toast notifications is simple: keep the user feeling connected and engaged to your app. In this article, we take a closer look at Windows Store app notifications and Push Notification architecture, laying the groundwork before we look at how to trigger such Push Notifications from cloud services. Let’s dive in.
App Tiles are the front doors to your Windows Store apps, and your first opportunity to make a good impression with the user. Tiles are the representations of your app on the Windows Start screen and, most commonly, the launch pad of how the user starts your app. So, a well-branded app tile with pertinent information invites the user into your app. Tiles come in several sizes, and can display text, images, app branding and notification badges. A sample assortment of tile types is as below.
The anatomy of a tile is based on a non-extensible set of Windows-provided XML templates, as defined in the Tile Template catalog. This is an exhaustive list where each template provides an unique way to present a mix of text and images in varying sizes, based on how the user may have the app tile configured on their start screen. Tile templates can be static or peek; the contents of a peek tile scrolls up and down within the tile space to display the full communication, while static tiles are fixed. A quick sample of a named Tile template, along with the XML needed to construct the tile is shown below.
As we talk Push Notifications later, let’s remember the Tile Template catalog – a large assortment of Tile notifications that can be used to entice the user back into our app. Also, tile notifications can be cycled, automatically rotating through up to five current notifications on the tile, using notification queues.
If the user experience of diving directly to a certain section of the app is beneficial, developers have the option of offering the ability to pin a separate tile on the start screen, called the Secondary Tile. Each Windows Store app decides which content to offer for pinning, but the user chooses whether the secondary tile will be created or deleted; this cannot be controlled programmatically. Secondary tiles allow the user to personalize their start screen with the experiences they use the most, like specific cities for a Weather app or catalogs in a News app. Secondary tiles are different from the main app tile and can receive notification updates independently, still adhering to the Tile Template catalog guidelines. When the user launches an app from a Secondary tile, an activation context or deep link is provided, so that developers get to direct the user experience to a specific part of the app.
Badges often convey summary or status information specific to your app. They appear on top of the live tiles and may often be confused as a part of the tile itself. Badges, however, stand on their own with matching schema templates and can be updated independent of the app tile. Badges show up usually in the right bottom corner of the tiles and can often be the reason users tap/click on a tile.
A badge can convey either a numeric value from 1-99 or a Windows defined glyph. The numbers are often used to provide information that can be counted, like the number of unread messages in an email app, for instance. The glyphs are non-extensible and provide summary information like social media availability or media playback controls. Two sample badge updates, one with numeric value and the other with a glyph, are shown below.
The available glyphs for use with Windows are shown below, along with their XML equivalent in the badge template.
A Toast notification is a transient message shown to the user that contains relevant, time-sensitive information and provides quick access to related content in the parent app. It is like an invitation back into your app. Now, unlike tiles or badges that only show up in the Start screen, a transient toast notification shows up in the top right corner (or left based on the globalization settings) of the user’s screen, irrespective of what the user is up to anywhere in Windows. So, toast notifications can be quite powerful to draw attention, but this calls for restraint as the user has the option of enabling/disabling toasts at any time.
An sample assortment of possible toast notifications is shown below.
Just like tiles, toasts can contain a combination of text and/or images, as per the pre-defined anatomy listed in the Toast Template catalog. A sample toast notification along with the XML template is shown below.
Toasts can optionally be of longer transient duration, be scheduled at specific and recurring times or play sounds upon arrival. In short, toasts are a very powerful notification mechanism in Windows that immediately attracts the user’s attention, with an invite back into the parent app.
Now that we talked about all the different notification types supported in Windows Stores apps – namely tiles, badges and toasts, how does one fire up these notifications? Let’s look at options we have as developers to deliver such notifications to our app users. There are four:
There are couple of steps involved for developers to enable push notifications in their apps. The Push Notification architecture is represented in the following figure:
My good friend Jeff Blankenburg uses the following real-world scenario to describe how the push notifications architecture works:
Say you got a new house. What’s the first thing you do? You head over to the Post Office to get yourself an address. Next, what good is you knowing the address of your own home? So, you immediately inform your family/friends of your new home address – may be even ask for house-warming gifts. Now, your family/friends acknowledge your new address; but when they need to send you a package, they do not often swing by your house in person. Instead, they normally send the packages to the Post Office asking for delivery to your house address, which in turn, sends out postmen to deliver the packages.
This is very similar to what goes on to empower Windows Store apps with push notifications from the cloud. Here’s a breakdown of the steps involved (the step numbers relate to the figure above):
In this article, we reviewed the various notification types and delivery mechanisms for keeping your Windows Store app users engaged. We also took a closer look at the architectural pieces behind getting Push Notifications to work for Windows users. Overall, there are lots of choices for developers to keep their users feeling connected to their app at all times. With the stage set, I’ll cover more details on implementing push notifications from the cloud in upcoming articles.
Also, if you are building Windows 8.1 apps in HTML or XAML, Telerik UI for Windows 8 offers a robust toolset of controls and framework pieces. Give the free trial a spin today!
Note: Many of the images used in this article are courtesy of Microsoft.