StoreServicesEngagementManager.RegisterNotificationChannelAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RegisterNotificationChannelAsync() |
Registers your app to receive targeted push notifications from Partner Center. |
RegisterNotificationChannelAsync(StoreServicesNotificationChannelParameters) |
Registers your app to receive targeted push notifications from Partner Center, with the option to specify the notification channel to use for the notifications. |
RegisterNotificationChannelAsync()
Registers your app to receive targeted push notifications from Partner Center.
public:
virtual IAsyncOperation<StoreServicesNotificationChannelRegistrationResult ^> ^ RegisterNotificationChannelAsync() = RegisterNotificationChannelAsync;
/// [Windows.Foundation.Metadata.Overload("RegisterNotificationChannelAsync")]
IAsyncOperation<StoreServicesNotificationChannelRegistrationResult> RegisterNotificationChannelAsync();
[Windows.Foundation.Metadata.Overload("RegisterNotificationChannelAsync")]
public IAsyncOperation<StoreServicesNotificationChannelRegistrationResult> RegisterNotificationChannelAsync();
function registerNotificationChannelAsync()
Public Function RegisterNotificationChannelAsync () As IAsyncOperation(Of StoreServicesNotificationChannelRegistrationResult)
Returns
A StoreServicesNotificationChannelRegistrationResult that represents the result of the asynchronous operation.
- Attributes
Remarks
To register your app to receive Partner 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 targeted push 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 this method, 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.
See also
Applies to
RegisterNotificationChannelAsync(StoreServicesNotificationChannelParameters)
Registers your app to receive targeted push notifications from Partner Center, with the option to specify the notification channel to use for the notifications.
public:
virtual IAsyncOperation<StoreServicesNotificationChannelRegistrationResult ^> ^ RegisterNotificationChannelAsync(StoreServicesNotificationChannelParameters ^ parameters) = RegisterNotificationChannelAsync;
/// [Windows.Foundation.Metadata.Overload("RegisterNotificationChannelWithParametersAsync")]
IAsyncOperation<StoreServicesNotificationChannelRegistrationResult> RegisterNotificationChannelAsync(StoreServicesNotificationChannelParameters const& parameters);
[Windows.Foundation.Metadata.Overload("RegisterNotificationChannelWithParametersAsync")]
public IAsyncOperation<StoreServicesNotificationChannelRegistrationResult> RegisterNotificationChannelAsync(StoreServicesNotificationChannelParameters parameters);
function registerNotificationChannelAsync(parameters)
Public Function RegisterNotificationChannelAsync (parameters As StoreServicesNotificationChannelParameters) As IAsyncOperation(Of StoreServicesNotificationChannelRegistrationResult)
Parameters
- parameters
- StoreServicesNotificationChannelParameters
Returns
A StoreServicesNotificationChannelRegistrationResult that represents the result of the asynchronous operation.
- Attributes
Remarks
To register your app to receive Partner Center notifications and specify the notification channel to use for the 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 for targeted push notifications.
Note
When you call this method, 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.