Delen via


PushNotificationChannelManager.CreatePushNotificationChannelForSecondaryTileAsync Method

Definition

Creates an object, bound to a secondary tile, through which you retrieve a push notification channel from Windows Push Notification Services (WNS). The tile can be a secondary tile of the calling app or any other app in the same package.

public:
 static IAsyncOperation<PushNotificationChannel ^> ^ CreatePushNotificationChannelForSecondaryTileAsync(Platform::String ^ tileId);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<PushNotificationChannel> CreatePushNotificationChannelForSecondaryTileAsync(winrt::hstring const& tileId);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<PushNotificationChannel> CreatePushNotificationChannelForSecondaryTileAsync(string tileId);
function createPushNotificationChannelForSecondaryTileAsync(tileId)
Public Shared Function CreatePushNotificationChannelForSecondaryTileAsync (tileId As String) As IAsyncOperation(Of PushNotificationChannel)

Parameters

tileId
String

Platform::String

winrt::hstring

The ID of the secondary tile to bind to the push notification channel.

Returns

The object, bound to the secondary tile, that is used to request a PushNotificationChannel from the Windows Push Notification Services (WNS).

Attributes

Examples

This example shows the use of this 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.
})

Remarks

Note

Channels bound to secondary tiles only accept push notifications for Tile and Badge update types.

Applies to

See also