I am facaing a problem with registering my application to receive notifications from dev center.
I was following this tutorial to configure the app (link) and this is my JS (WinJS app) code that I have:
Microsoft.Services.Store.Engagement.StoreServicesEngagementManager.getDefault().registerNotificationChannelAsync();
I am calling that on "activated" event of "WinJS.Application".
When I console log the response, I receive the channel URI so I thought that its correct, but when I open DEV center and create new "Ask for rating" notification, I get this message: "You must configure your app to receive notifications using the Microsoft Store Services SDK."
Application is signed, in store, but it is still not working.
Please, could anyone help me with that? What I am doing wrong?
Thank you
I test below code and it works without the warning in Dev Center.
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
RegisterEngagementNotification();
}
private async void RegisterEngagementNotification()
{
StoreServicesEngagementManager engagementManager = StoreServicesEngagementManager.GetDefault();
await engagementManager.RegisterNotificationChannelAsync();
}
You need to associate your project with the app name in Dev Center and run your code. Then go back to Dev Center and create the notification.
Update:
I also test the code in the video you provide, which works well:
app.onactivated = function (args)
{
notification.StoreServicesEngagementManager.getDefault().registerNotificationChannelAsync();
}
Just make sure you associate your project with the app name in the Store and run it to build the channel.