我剛開始使用Azure推送通知的演示應用程序。在我的演示中,我可以向所有Windows設備廣播通知,但是我想使用標記向個別用戶發送通知。所以我遵循Azure Notification Hubs Notify Users with .NET backend的所有說明和演示代碼。該通知沒有目標應用程序
但發送窗口和WP的推送通知時出錯。這裏是我的代碼:
outcome = await Notifications.Instance.Hub.SendWindowsNativeNotificationAsync(toast, userTag);
我得到follwing錯誤:
The remote server returned an error: (400) Bad Request. The notification has no target applications. The notification format is windows. Review the credentials specified in the notification hub description and the notification format. .TrackingId:2aca8783-c5eb-41f8-a821-6f457806ca86_G7,TimeStamp:11/29/2016 1:40:07 PM
我沒有註冊我的Windows應用商店的應用程序。我想這是造成問題,但爲什麼它是爲廣播工作?當我用標籤發送給個人用戶時,會出現上述錯誤。
請讓我知道我錯了。是否有必要註冊應用程序在Windows商店發送通知與單個用戶的標籤?
我有不同的廣播和單用戶模板。但我沒有在寡婦商店註冊我的應用程序。所以首先我想我需要註冊我的應用程序。 –
這是一個好主意。 –