An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
Hi everyone,
I reported the original issue above and recently discovered a hybrid situation that works. While this solution might stop working in the future, I thought I would document it for others to find.
The solution depends on one key fact: the .NET Maui Windows app needs to be deployed using the same name as a UWP app that has been setup in Partner Center. In my case, I had shipped a Xamarin / UWP for years before converting to .NET Maui. My .NET Maui version will ship with the same name as my app in the past, where name is the attribute in the <Identity Name="company_name.appname" ... /> node of the appxmanifest.
While implementing the production version of the means to send directly to WNS, I noticed is that the channel uri created by my .NET Maui app when using the old Windows.Networking.PushNotifications (UWP) code was THE SAME as the channel uri created by the WinAppSDK Microsoft.Windows.PushNotifications.
Since we had the new client code to receive the notifications written (based on the WinAppSDK docs) I tried the new client code running under the old Xamarin /UWP app name with the Azure Notification hub connection on my backend -- AND IT WORKED!
So that's it; in summary:
- .NET Maui Windows app name (as in <Identity Name= .../>) must match a UWP app set up in Partner Center. There may be some nuances here that I don't know about.
- Use the new WinAppSDK client notification handling model per documentation, although I realize this is not as easy as it sounds.
- Configure Azure Notification Hub WNS support using the SID of the UWP app registration and other details from Partner Center (which I had left unchanged before the past).
Amazing. Good luck!
Craig.