PushNotificationChannelManager class

Applies to Windows and Windows Phone

Creates objects that you use to retrieve push notification channels from the Windows Push Notification Services (WNS). These channels are bound to an app or secondary tile.

Syntax


public ref class PushNotificationChannelManager abstract sealed 

Attributes

[Threading(MTA)]
[Version(0x06020000)]

Members

The PushNotificationChannelManager class has these types of members:

Methods

The PushNotificationChannelManager class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
CreatePushNotificationChannelForApplicationAsync() Creates an object, bound to the calling app, through which you retrieve a push notification channel from Windows Push Notification Services (WNS).
CreatePushNotificationChannelForApplicationAsync(String) Creates an object, bound to a specified app, through which you retrieve a push notification channel from Windows Push Notification Services (WNS).
CreatePushNotificationChannelForSecondaryTileAsync Creates an object, bound to a secondary tile, through which you retrieve a push notification channel from Windows Push Notification Services (WNS).

 

Examples

The following example shows the use of the CreatePushNotificationChannelForApplicationAsync method to retrieve a push notification channel for the calling app.



var pushNotifications = Windows.Networking.PushNotifications;
var channel;

function openNotificationsChannel() {
    var channelOperation = pushNotifications.PushNotificationChannelManager.createPushNotificationChannelForApplicationAsync();
    return channelOperation.then(function (newChannel) {
        channel = newChannel;
    }
);

The following example shows the use of the CreatePushNotificationChannelForSecondaryTileAsync method to retrieve a push notification channel for a secondary tile.



var pushNotifications = Windows.Networking.PushNotifications;
var channel;

pushNotifications.PushNotificationChannelManager.createPushNotificationChannelForSecondaryTileAsync(myTileId).then(function (channel) {
    // Your code here.
})

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Networking.PushNotifications
Windows::Networking::PushNotifications [C++]

Metadata

Windows.winmd

Capabilities

internetClient

See also

PushNotificationChannel
WNS overview
Push and periodic notifications sample
Quickstart: Sending a tile push notification
Quickstart: Sending a toast push notification
How to update a badge through push notifications
How to authenticate with the Windows Push Notification Service (WNS)
How to request, create, and save a notification channel
Guidelines and checklist for push notifications
Push notification service request and response headers

 

 

Show:
© 2014 Microsoft