In the past couple of months we’ve added some really cool Windows Phone 7.1 (Mango) features to the Softlayer Mobile application, including Lives Tiles and Notifications. While a basic Live Tile implementation is relatively easy, there’s a fair amount of coding and architecture requirements to facilitate cooler Live Tile functionality and Notifications … And we’re all about doing things cooler.
Live Tiles is a such great feature of Windows Phone 7 largely because it gives the developer much more control over the device’s user experience when compared to other mobile OSes. Live Tile functionality in its simplest form can be just ‘Pinning’ the Tile to the Start Menu with a deep link to a specific location within the application so that when clicked the user is taken to that location within the app. This can save the user a lot of time in having to navigate deep into an app if they know where they want to go. More advanced features of Live Tiles include programmatically giving the Tile a custom background image and displaying a notification message on the background when the Tile flips.
Adding a Live Tile
To add a Live Tile, a user simply clicks and holds the module they’d like to pin to the start menu. When the context menu appears, the user can select ‘pin as tile,’ and he or she will be taken to the Start page where the new Tile is displayed:
The Magic Behind Sending Notifications
We really wanted to be able to notify a user when a notable event happens on his or her account (new ticket is created/updated, when a bill is overdue, etc.), and Windows Phone 7 provides some pretty phenomenal functionality in that area … I wouldn’t be surprised if other big mobile OSes copy Windows Phone 7′s notifications in the future. When it comes to implementing notifications in SoftLayer Mobile, we needed to handle a few things:
- Get a Unique App+User Channel URI from Windows Push Notification Server
- Register URI & Channel Name with the Softlayer Registration Service (WCF we created)
- Store this URI, Channel Name and the user’s Account in a DB
- Periodically poll for new tickets or updates (since we don’t have a mechanism yet that can ‘push’ this alert when any notification event is triggered)
- Send Notification (whether it’s a Toast or Tile notification) to device via the unique URI & Channel name.
I was going to include the architecture diagram here showing this relationship and process, but the designer sitting next to me told that nobody wants to see that.
What do the Numbers on the Tiles Mean?
We wanted to make our Tiles show information that the user would find useful, so we send the account’s total unread ticket count to the main app’s Tile, and we display the account’s unread ticket update count on the “Ticket” Tile we pinned to the Start screen:
Why is the Tile Flipping?
We also have the ability to have the Tiles flip over and show an image or text on the TileBack, so we use that to explain the number shown on the Tile (so you don’t have to remember):
What is a Toast Notification?
A Toast Notification is a message that pops up on the screen for 10 seconds. If the user clicks on it, he or she is taken to the application, but if the notification is not clicked, it will disappear. Here is the Toast Notification that is sent to a user when a ticket is updated if they subscribe to Toast Notifications:
How do I Enable Notifications in SoftLayer Mobile?
To enable Live Tiles, all you have to do is turn on the ‘Use Push Notifications’ option on the Settings view.
You’ll be asked if you’d like to receive Toast Notifications, and if you click ‘OK,’ you’ll start getting them:
We Love Feedback and Requests!
Now that you have Live Tiles & Notifications in Softlayer Mobile for WP7 (and coming soon for iPhone & Android), what else would you like to see in the mobile clients?