RegisterNotificationChannelAsync() | registerNotificationChannelAsync() method

StoreServicesEngagementManager.RegisterNotificationChannelAsync() | registerNotificationChannelAsync() method

Registers your app to receive targeted push notifications from Windows Dev Center.

Syntax


public:
IAsyncOperation<StoreServicesNotificationChannelRegistrationResult>^ RegisterNotificationChannelAsync()

Parameters

This method has no parameters.

Return value

Type: IAsyncOperation<StoreServicesNotificationChannelRegistrationResult>

A StoreServicesNotificationChannelRegistrationResult that represents the result of the asynchronous operation.

Remarks

To register your app to receive Windows Dev Center notifications, call this method in startup code in your app. Before you can use this method in your code, you must first install the Microsoft Store Services SDK and add a reference to the Microsoft Engagement Framework to your project.

For more guidance about how to use this method, including a code example, see Configure your app to receive Dev Center notifications.

Important  If your app also calls CreatePushNotificationChannelForApplicationAsync to create a notification channel for WNS, make sure that your code does not call CreatePushNotificationChannelForApplicationAsync and RegisterNotificationChannelAsync simultaneously. If you need to call both of these methods, make sure that you call them sequentially and await the return of one method before calling the other.
 
Note  When you call RegisterNotificationChannelAsync, a file named MicrosoftStoreEngagementSDKId.txt is created in the local app data store for your app. This file contains an ID that is used by the targeted push notifications infrastructure. Make sure that your app does not modify or delete this file. Otherwise, your users may receive multiple instances of notifications, or the notifications may not behave properly in other ways.
 

Requirements

Minimum supported client

Windows 10

Minimum supported server

None supported

Minimum supported phone

Windows 10 Mobile

Namespace

Microsoft.Services.Store.Engagement
Microsoft::Services::Store::Engagement [C++]

Metadata

Microsoft.Services.Store.Engagement.winmd

See also

Configure your app to receive Dev Center notifications
StoreServicesEngagementManager
RegisterNotificationChannelAsync(StoreServicesNotificationChannelParameters)

 

 

Show:
© 2017 Microsoft