java - 如何使用谷歌云连接服务器发送上游 GCM 消息

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

我正在尝试使用 Google 云消息传递的新云连接服务器功能将上游消息从设备发送到云端。我正在使用入门指南中的示例代码。
http://developer.android.com/google/gcm/gs.html

我能够设置客户端并获取注册 ID。但是当我发送 消息到服务器没有任何反应。我不确定是否需要在服务器端进行一些设置。我的基本服务器要求是从客户端接收消息并发回响应。我正在使用基于 Java 的后端服务器。我在有关服务器端设置的文档中找不到任何具体内容。

有人可以帮忙吗?

最佳答案

是的,这绝对是可能的
http://developer.android.com/google/gcm/ccs.html

The GCM Cloud Connection Server (CCS) allows third party servers to communicate with 
Android devices by establishing a persistent TCP connection with Google servers using the 
XMPP protocol. This communication is asynchronous and bidirectional.

关于java - 如何使用谷歌云连接服务器发送上游 GCM 消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16935475/

相关文章:

java - 如何在删除某个元素后重新绘制 GUI?

php - 在 GCM 中未收到推送通知

javascript - Java中如何通过request get参数获取html按钮的id?

java - 算法改进 : Keeping circle at boundary of a defined shape

android - 在 Android WebViews 上调试缓慢的点击响应?

android - App连接云端用了多少手机流量

android - onClick 错误地启动 Activity(在 2.3.6 中)

cordova - 混合移动应用程序是否支持推送通知?

ios - 在 iOS 应用程序中显示通知,而应用程序在前台/在 swift 3 中处于事件状态

java - R.Java修改后不断恢复,解决错误