Share via


PushNotificationChannelManager.CreatePushNotificationChannelForSecondaryTileAsync Methode

Definition

Erstellt ein An eine sekundäre Kachel gebundenes -Objekt, über das Sie einen Pushbenachrichtigungskanal von Windows-Pushbenachrichtigungsdiensten (WNS) abrufen. Die Kachel kann eine sekundäre Kachel der aufrufenden App oder einer beliebigen anderen App im selben Paket sein.

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)

Parameter

tileId
String

Platform::String

winrt::hstring

Die ID der sekundären Kachel, die an den Pushbenachrichtigungskanal gebunden werden soll.

Gibt zurück

Das an die sekundäre Kachel gebundene Objekt, das verwendet wird, um einen PushNotificationChannel von den Windows-Pushbenachrichtigungsdiensten (WNS) anzufordern.

Attribute

Beispiele

Dieses Beispiel zeigt die Verwendung dieser Methode zum Abrufen eines Pushbenachrichtigungskanals für eine sekundäre Kachel.

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

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

Hinweise

Hinweis

Kanäle, die an sekundäre Kacheln gebunden sind, akzeptieren nur Pushbenachrichtigungen für Kachel- und Badge-Updatetypen .

Gilt für:

Weitere Informationen