0
votes

My WP7 app needs to handle different types of push notification. Some of these are only relevant when the app is running but one type serves as a prompt to the user to start the app as well as needing to be handled while the app is running. Hence, when opening the push channel, my code calls BindToShellToast and registers event handlers for when both raw and toast notifications are received:

if (!_pushChannel.IsShellToastBound)
{
    _pushChannel.BindToShellToast();
}

_pushChannel.HttpNotificationReceived += new EventHandler<HttpNotificationEventArgs>(pushChannel_HttpNotificationReceived);
_pushChannel.ShellToastNotificationReceived += new EventHandler<NotificationEventArgs>(pushChannel_ShellToastNotificationReceived);

Looking at the certification requirements, it appears that I have to provide a user setting to allow them to enable/disable not only push notifications in general, but also specifically toast notifications. See Additional requirements for specific app types for Windows Phone (requirement 6.2.1)

Since the user could potentially enable general push notifications but disable toast notifications, it seems to me that my server would need to send both a raw and a toast notification for the type that needs to be handled when the app is not running. This would make registering for the ShellToastNotificationReceived event pointless. Is my thinking correct here?

1

1 Answers

0
votes

You should store a settings on your server for each registered device naming what type of notification the user allowed.