PushNotificationChannelManager.CreatePushNotificationChannelForSecondaryTileAsync 方法

定義

建立物件,系結至 次要磚,您可以從 Windows 推播通知服務擷取推播通知通道, (WNS) 。 磚可以是呼叫應用程式的次要磚,或相同套件中的任何其他應用程式。

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)

參數

tileId
String

Platform::String

winrt::hstring

要系結至推播通知通道的次要磚識別碼。

傳回

系結至次要磚的物件,用來從 Windows 推播通知服務要求 PushNotificationChannel (WNS) 。

屬性

範例

這個範例示範如何使用這個方法來擷取次要磚的推播通知通道。

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

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

備註

注意

系結至次要磚的通道只接受 徽章 更新類型的推播通知。

適用於

另請參閱