Receiving a Toast Notification from Within an Application

The HttpNotificationChannel.ShellToastNotificationReceived event is used to receive toast notifications within your app, like so:

channel.ShellToastNotificationReceived +=          channel_ShellToastNotificationReceived;

Note

Toast notifications are displayed only when your app is not running in the foreground. If your app is running in the foreground, the toast notification can still be received and handled in code.

When the ShellToastNotificationReceived event is raised, the handler receives a NotificationEventArgs object from which the relevant toast notification fields can be extracted, as shown:

void channel_ShellToastNotificationReceived( ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.