Windows Phone 8.1 for Developers – Notifications

This blog post is part of a series about how Windows Phone 8.1 affects developers. The series is written in collaboration with Microsoft evangelist Peter Bryntesson, check out his blog here.

Introduction

In this blog post I will do a quick overview of what is new with notifications in Windows Phone 8.1. This is the first impression of the functions so I do recommend you to take a look at MSDN if you want a deeper understanding of how it works.

Recap on how it is done in Windows Phone 8

Alarm

Example of how to set up an alarm:

Reminder

Example of how to set up a reminder:

Toast

Simple toast example:

Windows Phone 8.1

Toast

In Windows Phone 8.1 we get the same toast system as Windows 8.1. It is a lot like how to tiles work, the toast are described with a XML-tree. Example of XML toast:

What different toast types there are can be found here, http://msdn.microsoft.com/en-us/library/Windows/apps/Windows.ui.notifications.toasttemplatetype.aspx. There are four with text and again the same four but also with an image. On the phone however the image is ignored if you use the type. So in principle there are only four types. There are a use case to set the image anyway and that is if you share code between a phone and store project. The different types can be found in the ToastTemplateType class, and retrieved with the GetTemplateContent function. The code becomes very similar to that of a tile update but instead of calling update we call show.

To create a schedule toast it is very easy, just change it to a ScheduledToastNotification add a time and then add it to the schedule:

Alarm and Reminder

Alarm and reminder are not available in Windows Phone 8.1. There are no equivalent in Windows 8.1 for this. If this is a deal breaker for your app you can update to Silverlight 8.1 to still be able to use some of the other new features of Windows Phone 8.1.

If you choose Silverlight 8.1 both toast versions work side by side.

This Post Has 5 Comments

  1. For windows phone 8.1 Silverlight version, the navigation URI doesn’t work for when the user taps on the Reminder Pop up. Any solution for that?

  2. Hi,
    Robert Hedgate , nice post.

  3. Hi,
    Please help me which file i will add this code

    Line 1

    Thanks

Leave a Reply

Close Menu