Google Cloud Messaging for Android library vs. Google Play Services

Xeos picture Xeos · Aug 27, 2013 · Viewed 13k times · Source

Current Google GCM documentation requires you to install Google Play Services and to use them for GCM (Google Cloud Messaging). The library is 1.1MB, yet my current .apk is half that size. My app is intended to receive GCM and display some data on the screen, so I don't need Google Play Services' Maps API, G+ login, etc. Nor I need to be able to respond back to the server after getting GCM.

SDK Manager allows download and installation of standalone Google Cloud Messaging for Android package. It is the one that was used before Google I/O 2013, where Play Services were announced.

My question is: what is the difference in performance between GPS's GCM and standalone GCM for Android? Do I really have to switch to GPS? Is standalone GCM depricated? Can I still receive data (up to 4K) with standalone GCM?

Answer

luthier picture luthier · Aug 27, 2013

As far as I know, yes, the old one is deprecated (it says so here http://developer.android.com/reference/gcm-packages.html), but still works.

I would recommend using the Play Services version, though, since it's MUCH easier to configure and use, and if you don't need G+ login or anything else you don't have to use it. Yes, your APK will be a little bit bigger, but I think it's worth it.

Plus, any new features or improvements to the protocol will most likely be only for the Play Services library, and not for the old one.