0
我使用pushsharp的窗口電話的標準推送通知碼。 我收到設備上的通知。但問題是,我得到多個回調爲每個事件。例如,對於一個通知,我得到5個回叫創建通道,發送通知等。一個通知pushsharp窗口電話的多個回調
請幫助我,我在哪裏做錯了。
var push = new PushBroker();
push.OnChannelCreated += push_OnChannelCreated;
push.OnChannelDestroyed += push_OnChannelDestroyed;
push.OnChannelException += push_OnChannelException;
push.OnDeviceSubscriptionChanged += push_OnDeviceSubscriptionChanged;
push.OnDeviceSubscriptionExpired += push_OnDeviceSubscriptionExpired;
push.OnNotificationFailed += push_OnNotificationFailed;
push.OnNotificationRequeue += push_OnNotificationRequeue;
push.OnNotificationSent += push_OnNotificationSent;
push.OnServiceException += push_OnServiceException;
push.RegisterWindowsService(new WindowsPushChannelSettings("NotificationFra",
"ms-app://s-1-15-2-", "bJl6kdPqXWtOclINfKNC"));
//Fluent construction of a Windows Toast Notification
push.QueueNotification(new WindowsToastNotification().WithLaunch("{\"message\":\"Hi PushNotification\",\"messageToken\":\"[email protected]\",\"notificationType\":3}")
.AsToastText01("Notification Test for Daily alerts intrade FTD MTD ")
.ForChannelUri("https://hk2.notify.windows.com/?token=AwYAAAA%2b21ScKkaVZhp5vwRRPn7DWlEqvzKmTXy%2bNfcONUzq9PeglhxTLlD06%2fiLcgyuu9BbdeuY8Pgl"));
push.StopAllServices(waitForQueuesToFinish: true);
有誰對此有任何想法? –
任何人都可以使用上面的代碼並重現問題。如果有人能解決這個問題,請幫助我 –