【问题标题】:PushSharp "Notification send timed out" issuePushSharp“通知发送超时”问题
【发布时间】:2014-07-24 20:43:08
【问题描述】:

我正在尝试使用 PushSharp 通过 Google Gcm 向我的移动设备发送通知。 根据我编写的示例代码,我从 github 下载了示例应用程序。下面是我的示例代码。

var googleKey = CustomConfigurationManager.GetValueFromSection("appSettings", "GoogleServerAccessKey");
            AndroidPushBroker.RegisterGcmService(new PushSharp.Android.GcmPushChannelSettings(googleKey));

            GcmNotification androidNotifcation = new GcmNotification().WithDryRun()
                .WithJson("{\"alert\":\"Hello World!\",\"badge\":7,\"sound\":\"sound.caf\"}");
            AndroidPushBroker.QueueNotification(androidNotifcation);

问题是虽然我使用了 WithDryRun() 并且在连接请求时它显示带有“dry_run”的 json 数据:true,但我仍然收到通知失败错误,原因是:“通知发送超时”。

谁能告诉我我错过了什么?

【问题讨论】:

    标签: google-cloud-messaging pushsharp


    【解决方案1】:

    尝试在没有WithDryRun() 的情况下运行它,看看你是否在NotificationSentChannelExceptionNotificationFailedServiceException 等事件中得到任何东西。

    【讨论】:

      猜你喜欢
      • 2014-06-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多