Google Cloud Messaging - CCS (XMPP) vs HTTP server

前端 未结 5 1329
执念已碎
执念已碎 2020-12-30 03:53

I\'ve read the documentation https://developer.android.com/google/gcm/index.html

and the only difference I can see is that a CCS (XMPP) based server allows bi-direct

5条回答
  •  一向
    一向 (楼主)
    2020-12-30 04:27

    CCS (XMPP) is asynchronous, which means it should be faster than HTTP. It also uses the existing GCM connection on the device to send messages from your app to your server (which saves battery, since you don't have to open your own connection to your server).

    On the other hand, HTTP is much simpler to code, so unless you need the bi-directional functionality or you need to send messages in a very high speed, I'd stick with HTTP.

提交回复
热议问题