PushNotificationManager.CreateChannelAsync(Guid) Method

Definition

Asynchronously requests a push channel from the Windows Push Notification Service (WNS).

Note

The PushNotificationManager class has a dependency on the Singleton package. Because of that dependency, there are certain considerations to be aware of if you're calling these APIs from a self-contained app. For more info, and specifics, see Dependencies on additional MSIX packages.

public:
 virtual IAsyncOperationWithProgress<PushNotificationCreateChannelResult ^, PushNotificationCreateChannelStatus> ^ CreateChannelAsync(Platform::Guid remoteId) = CreateChannelAsync;
IAsyncOperationWithProgress<PushNotificationCreateChannelResult, PushNotificationCreateChannelStatus> CreateChannelAsync(winrt::guid const& remoteId);
public IAsyncOperationWithProgress<PushNotificationCreateChannelResult,PushNotificationCreateChannelStatus> CreateChannelAsync(Guid remoteId);
function createChannelAsync(remoteId)
Public Function CreateChannelAsync (remoteId As Guid) As IAsyncOperationWithProgress(Of PushNotificationCreateChannelResult, PushNotificationCreateChannelStatus)

Parameters

remoteId
Guid

Platform::Guid

winrt::guid

The remote identifier for the created push channel. This value, known as the Azure AppId, is a GUID that matches the application ID specified in Azure Active Directory (AAD). For information on getting your application ID, see Use the portal to create an Azure AD application and service principal that can access resources

Returns

An asynchronous action with progress that returns a PushNotificationCreateChannelResult on completion.

Remarks

In most cases channel creation requests should complete in a few seconds. Because this is a network operation, channel request operations can fail initially, which triggers retry logic built-in to the platform. In these cases channel request operations can take between 2 and 16 minutes.

Applies to