Share via


PushNotificationChannel Class

Definition

Represents a delivery vehicle and addressing mechanism for push notifications.

The channel Uniform Resource Identifier (URI)represented by this interface is used by a third-party application server to communicate with the Windows Push Notification Services (WNS). The push notification channel is used by the client to intercept notifications.

public ref class PushNotificationChannel sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
class PushNotificationChannel final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class PushNotificationChannel final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class PushNotificationChannel
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class PushNotificationChannel
Public NotInheritable Class PushNotificationChannel
Inheritance
Object Platform::Object IInspectable PushNotificationChannel
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)
App capabilities
internetClient

Remarks

This object is returned through an instance of the IAsyncOperation interface which is returned through the CreatePushNotificationChannelForApplicationAsync method. When the asynchronous operation completes successfully, it returns the PushNotificationChannel object through a then or done method.

Properties

ExpirationTime

Gets the time at which the channel expires. Notifications sent to this channel after this time are rejected.

Uri

Gets the Uniform Resource Identifier (URI) to which an app server sends a push notification intended for an application or secondary tile bound to this channel. This Uniform Resource Identifier (URI) is transmitted to and stored by the third-party app server.

Methods

Close()

Explicitly invalidates this channel. Any notifications pushed to this channel after this method is called are not delivered.

Events

PushNotificationReceived

Raised when a push notification arrives on this channel.

Applies to

See also