The basic concept of push notifications for Windows Phone doesn’t change for Mango. There are still three types (Push Notifications in Windows Phone), tile, toast and raw, and your application still needs to register with the Microsoft Push Notification Service in order to make use of this feature. The differences are that there are extensions to the service, which both plug holes in the initial implementation and provide support for multiple tiles and the back of tiles. Let’s go through the different types of notifications and I’ll point out some of the differences.
Toast Notifications
One of the issues with toast notifications in WP7 was that when the user clicked on the toast they were taken into the application as if they’d clicked on the application from the apps list. There was no arguments or information passed into the application to indicate where it had been launched from. This made it rather painful to do anything useful with toast notifications, other than trying to encourage users back into the application.
In Mango there is an additional (optional) Param element that can be specified in the toast message payload. This is essentially a navigation uri, or a query string, that is passed into the application. The payload message structure looks similar to the following:
string toastMessage = "<?xml version="1.0" encoding="utf-8"?>" +
"<wp:Notification >Setting up a Callback Registration Request