PushNotificationChannel.PushNotificationReceived | pushnotificationreceived event

1 out of 1 rated this helpful - Rate this topic

Fires when a push notification has arrived on this channel.

Syntax


public event TypedEventHandler<PushNotificationChannel, PushNotificationReceivedEventArgs> PushNotificationReceived

Event information

Delegate TypedEventHandler(PushNotificationChannel, PushNotificationReceivedEventArgs)

Remarks

Windows Push Notification Services (WNS) sends this event only when the notification's target app is in the foreground. If the app is suspended, it does not receive the event.

Examples

The following example shows a listener for this event, which invokes the event handler.



function listeningForPushNotification() {
    if (channel) {
        channel.addEventListener("pushnotificationreceived", pushNotificationReceivedHandler);
}

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

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

Metadata

Windows.winmd

Capabilities

internetClient

See also

PushNotificationChannel
Push notification 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

 

 

Build date: 12/4/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.