android - Pushwoosh/GCM - Android - 不接收消息

标签 android push-notification google-cloud-messaging pushwoosh

我正在使用 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!”。

enter image description here

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

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

enter image description here

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

更新:我正在使用最新的 Pushwoosh.jar 在这里找到:https://github.com/shaders/push-notifications-sdk/tree/master/SDK/Android

最佳答案

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

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

希望对大家有帮助! :)

关于android - Pushwoosh/GCM - Android - 不接收消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19258841/

相关文章:

android - 任务 ':expo:compileReleaseKotlin' 执行失败

android - 如何使用 appcompat 设置 View 样式

ios - 使用推送通知快速打开特定 View

ios - PHP 推送通知服务,反馈为空

javascript - 如何检查谷歌浏览器中用户是否已允许通知?

android - 在 Android 上处理 Google Cloud Messaging 中的注册 ID 更改

android - 每个用户使用多个设备的 GCM 应用服务器的实现

java - 为什么枚举元素的成员在某些设备中可以为空

android - 应用程序停止时如何接收来自 GCM 的通知

Android ListView - 更新时滚动回到顶部