Slide 1

Slide 1 text

Google Cloud Messaging Cloud Connection Server and XMPP

Slide 2

Slide 2 text

Google Play Services ● This meeting is about Android 4.4 ● But this talk is not :-) ● Google Play Services is all that's needed

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

Flow of Events

Slide 5

Slide 5 text

Android Code

Slide 6

Slide 6 text

Sample Message I

Slide 7

Slide 7 text

Sample Message II

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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!

Slide 10

Slide 10 text

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!

Slide 11

Slide 11 text

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!

Slide 12

Slide 12 text

https://plus.google.com/+WolframRittmeyer https://www.twitter.com/RittmeyerW http://www.grokkingandroid.com http://www.grokkingandroid.com/gcm_ccs