Share via


PushNotificationChannelManager.CreatePushNotificationChannelForSecondaryTileAsync Metode

Definisi

Membuat objek, terikat ke petak sekunder, tempat Anda mengambil saluran pemberitahuan push dari Windows Push Notification Services (WNS). Petak peta dapat menjadi petak sekunder dari aplikasi panggilan atau aplikasi lain dalam paket yang sama.

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

ID petak peta sekunder untuk mengikat ke saluran pemberitahuan push.

Mengembalikan

Objek, terikat ke petak sekunder, yang digunakan untuk meminta PushNotificationChannel dari Windows Push Notification Services (WNS).

Atribut

Contoh

Contoh ini menunjukkan penggunaan metode ini untuk mengambil saluran pemberitahuan push untuk petak sekunder.

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

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

Keterangan

Catatan

Saluran yang terikat ke petak sekunder hanya menerima pemberitahuan push untuk jenis pembaruan Petak danLencana .

Berlaku untuk

Lihat juga