首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PushSharp“通知发送超时”问题

PushSharp“通知发送超时”问题
EN

Stack Overflow用户
提问于 2014-07-25 04:43:08
回答 1查看 638关注 0票数 0

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

代码语言:javascript
复制
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":true的json数据,但我仍然收到通知失败的错误,原因是:“通知发送超时”。

有人能告诉我我错过了什么吗?

EN

回答 1

Stack Overflow用户

发布于 2014-10-09 00:48:49

试着在没有WithDryRun()的情况下运行它,看看do you get and in events如NotificationSentChannelExceptionNotificationFailedServiceException

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24943600

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档