客户端(Android应用程序)的ACK已发送邮件GCM [英] Client(android application) acks for sent gcm messages

查看:283
本文介绍了客户端(Android应用程序)的ACK已发送邮件GCM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android应用程序能获得通过googleclougmessaging.send()发送GCM消息CCS服务器的确认?客户端怎么能肯定在传递消息到CCS服务器?


解决方案

据云连接服务器的文档,从设备将消息发送到云时,只承认是从服务器的云连接服务器预期的确认。它只是告诉CCS您的服务器得到的消息,但CCS不承认这传递给设备。


  

下面是来自第三方的应用CCS预计ACK的格式
  响应于上述消息服务器

 <消息ID =>
  < GCM的xmlns =谷歌:手机:数据>
      {
          到:REGID,
          与Message_ID:M-123
          message_type:应答
      }
  < / GCM>
< /消息>


当然,服务器可以发送一个消息给设备以将其从设备得到的消息的响应,并且该消息可以作为确认

Can the android app get the acknowledgements for the sent gcm messages via googleclougmessaging.send() to ccs servers ? How can the client be sure about the delivery of the message to the ccs server ?

解决方案

According to the Cloud Connection Server docs, the only acknowledgment when sending a message from device to cloud is the acknowledgment expected by the Cloud Connection Server from your server. It only tells CCS that your server got the message, but CCS doesn't pass that acknowledgment to the device.

Here is the format of the ACK expected by CCS from 3rd-party app servers in response to the above message:

<message id="">
  <gcm xmlns="google:mobile:data">
      {
          "to":"REGID",
          "message_id":"m-123"
          "message_type":"ack"
      } 
  </gcm>
</message>

Of course, your server can send a message back to the device as a response to the message it got from the device, and that message can serve as an acknowledgment.

这篇关于客户端(Android应用程序)的ACK已发送邮件GCM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆