Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Google Cloud Messaging with CCS and XMPP

Google Cloud Messaging with CCS and XMPP

A talk about the new features in Google Cloud Messaging

D0ed2f28dd13ddfb192ebe198623924c?s=128

Wolfram Rittmeyer

January 16, 2014
Tweet

Transcript

  1. Google Cloud Messaging Cloud Connection Server and XMPP

  2. Google Play Services • This meeting is about Android 4.4

    • But this talk is not :-) • Google Play Services is all that's needed
  3. CCS • Upstream messaging possible • Permanent connection between servers

    – But Google keeps messages around a while • XMPP instead of HTTP • You cannot use it right away – You have to sign up for it
  4. Flow of Events

  5. Android Code

  6. Sample Message I

  7. Sample Message II

  8. Benefits • Reuses Connection – Battery friendly • More messages

    in a shorter timeframe • Android Client easier to develop – You need not care about queuing – No need to check for network availability • Notification cancellation
  9. Drawbacks • XMPP is less known than HTTP • Less

    information online about XMPP • I have found only one maintained Java lib • Less information online about CCS • Manual ACK / NACK handling • Proxy servers can be an issue • No Cloud Services support (as of yet) – Not even Google App Engine!
  10. Recommendation • It's beta, so stay calm :-) • Ideal

    for sending out many messages • To a very large user base • And for many return messages from device • Do not trust the emulator!
  11. What else • Github links: https://github.com/writtmeyer/gcm_sample https://github.com/writtmeyer/gcm_server • Blog post

    in the next days on grokkingandroid.com • A big thank you to Dennis Geurts!
  12. https://plus.google.com/+WolframRittmeyer https://www.twitter.com/RittmeyerW http://www.grokkingandroid.com http://www.grokkingandroid.com/gcm_ccs