Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Chapter 13. Push Notification > Getting Started with Push Notification

Feedback: 0 Comments on this Section

Getting Started with Push Notification

Getting Started with Push Notification The main CLR types used in push notification reside in the Microsoft.Phone.Notification namespace. To consume push notifications in an application, a reference to the Microsoft. Phone assembly is required (see Figure 13.3). Figure 13.3. Add a reference to Microsoft.Phone. To enable an application to use push notification, the ID_CAP_PUSH_NOTIFICATION capability must be present in the WMAppManifest.xml file. While not explicitly required for push notification, the ID_CAP_NETWORKING capability is also required if you want to notify a cloud service of the existence of an MNPS URI. Push notification is useless in most cases without the latter capability. The following excerpt shows the capabilities needed for push notification in the WMAppManifest.xml file: <Capabilities>
  <Capability Name="ID_CAP_NETWORKING" />
  <Capability Name="ID_CAP_PUSH_NOTIFICATION" />
</Capabilities> For more information on application capabilities, see Chapter 2, “Fundamental Concepts in Silverlight Development for Windows Phone.” Note To pass certification for the Windows Phone Marketplace, an app must provide the user with the ability to disable toast and tile notifications. The user must have the ability to perform this task from within the app. Furthermore, before calling either the HttpNotificationChannel.BindtoShellToast or HttpNotificationChannel.BindToShellTile methods for the first time, an application must explicitly ask the user for permission. These requirements give the user control over if and when push notification is used.

You are currently reading a free preview of this book.


Sign up for a
Safari Library subscription
to access Rough Cuts.


Subscribe Now