Universal apps and NotificationsExtensions (Part 1)
This is a series of blog posts on how to do notifications in Universal apps.
Managing notifications can be a bit “tricky”, you need to edit xml (or write the xml as a string yourself).
Luckily Microsoft has provided an Universal app project in their sample code that helps with creating notifications, it uses nice interfaces and classes to create the notifications.
I took their help classes from the sample, compiled and uploaded it as a Nuget package to make it simple to do notifications.
Right click on the solution then choose “Manage Nuget packages for solution”
Search for NotificationsExtensions.UniversalApps, press install.
You need to make sure you add the package to both the Windows phone and the Windows Store project (you don’t need to add it to the shared project).
To be able to do notifications you also need to enable Toasts, open edit Package.appxmanifest in the Windows phone and Windows 8 project and set Toast capable to “yes”.
Now you are good to go!
Microsoft has made the tiles and toast templates available on both platforms (Awesome!), they may look a bit different, see links in each blog post:
Microsofts code sample: