Pushwoosh / GCM - Android - 不接收消息

Posted

技术标签:

【中文标题】Pushwoosh / GCM - Android - 不接收消息【英文标题】:Pushwoosh / GCM - Android - Not receiving messages 【发布时间】:2013-10-08 21:31:56 【问题描述】:

我正在使用 Pushwoosh 在我的原生 android 应用上实现推送通知。

我点击了这个链接:http://www.pushwoosh.com/programming-push-notification/android/native-android-sdk-integration/

当我运行我的应用程序时,我会收到以下调试消息:

10-09 10:09:16.529: W/DeviceRegistrar(16545): Try To Registered for pushes
10-09 10:09:16.534: W/PushWoosh DeviceFeature2_5(16545): Try To sent AppOpen
10-09 10:09:17.749: W/PushWoosh: NetworkUtils(16545): PushWooshResult: "status_code":200,"status_message":"OK","response":null
10-09 10:09:17.749: V/GCMRegistrar(16545): Setting registered on server status as: true
10-09 10:09:17.754: W/PushWoosh: NetworkUtils(16545): PushWooshResult: "status_code":200,"status_message":"OK","response":null
10-09 10:09:17.754: W/PushWoosh DeviceFeature2_5(16545): Send AppOpen success
10-09 10:09:17.754: W/PushEventsTransmitter(16545): No android.permission.BROADCAST_STICKY. Reverting to simple broadcast
10-09 10:09:17.774: W/DeviceRegistrar(16545): Registered for pushes: APA91bEq5ihxMX7cr-qE1RLCEKF_mZf9PBGpNxerm3OhKnwk9iAnuGjDYkn3x-XR93OHJbYFOCayF7C-Q...

如您所见,一切似乎都正常(即设备已注册以接收推送消息)。

之后我去https://cp.pushwoosh.com/applications/01234-56789 然后我输入一条消息并点击“Woosh!”。

推送已发送,但我的设备上没有任何内容

另外,当我转到https://code.google.com/apis/console/#project:0123456789:stats 时,我看不到任何数据。它说“总请求:0”。 不应该显示超过 0 吗?

我做错了什么?为什么我没有收到我创建的推送?

更新:我使用的是最新的 Pushwoosh.jar:https://github.com/shaders/push-notifications-sdk/tree/master/SDK/Android

【问题讨论】:

【参考方案1】:

我终于找到了问题所在。防火墙阻止了 GCM 使用的端口!

欲了解更多信息,请查看此帖子:Which port and protocol does Google Cloud Messaging (GCM) use?

希望它可以帮助某人! :)

【讨论】:

您好,谢谢!我们会将其添加到指南中! Pushwoosh 团队【参考方案2】:

您可以轻松地将推送通知集成到您的 Android 应用程序中,请按照此Project 的步骤将推送通知集成到您的 Android 应用程序中

【讨论】:

以上是关于Pushwoosh / GCM - Android - 不接收消息的主要内容,如果未能解决你的问题,请参考以下文章

phonegap gcm 插件和 pushwoosh 出错

注册设备上的 Pushwoosh 回调

如何从 java 代码为 android 应用程序配置 Pushwoosh

phonegap pushwoosh 插件 registerDevice 回调函数永远不会在 android 上触发

如何将适用于 Android 的 Pushwoosh 插件添加到 Cordova IBM Worklight (@Eclipse)?

Android pushwoosh:从通知(带触发器)启动应用程序时,如何避免显示“使用完成操作”对话框