0

Notification Hubs を使用して、通知を iPhone と Windows ストア アプリに送信します。iPhone は問題なく動作していますが、通知の送信時に Windows ストアに問題があります。

エラー: 登録のプッシュ通知システム ハンドルが無効です。

テンプレート:

String WindowsTemplateStr = @"<toast><visual><binding template=""ToastImageAndText03""><image    id=""1"" src=""https://"" alt=""Customer""/><text id=""1"">$(headlineText)</text><text id=""2"">$(bodyText)</text></binding></visual></toast>";

このコードを使用して登録します。

登録 = await hubClient.CreateWindowsTemplateRegistrationAsync(userDeviceInformation.ChannelUri, Templates.WindowsNotificationTemplate, new string[] { userDeviceInformation.InstallationId, userDeviceInformation.UserName });

登録は問題なく行われ、"Service Bus Explorer" を使用して適切に関連付けられたタグを確認できます。

通知を送信しようとすると、これが私がすることです:

notification.Add("src", ImageUrl);
notification.Add("headlineText", String.Format("Message from {0}", fullName));
notification.Add("bodyText", String.Format("Message {0}", message));

通知が送信されても​​、デバイスでは何も受信されません。登録も削除されていることがわかります。

この動作の原因を見つけることができないようです。

何か案は ?

4

1 に答える 1