3

What is the difference and which one is better?

I am planning to develop an android application that will send a notification from one user of the app to another user of the same app using PHP, so which one is suited for developing this application?.

FinalDark
  • 1,748
  • 1
  • 16
  • 26
  • It does tell you on the dev docs page https://developers.google.com/android/c2dm/ that you can't use C2DM anymore, so the question is academic at best. – NickT Mar 06 '13 at 21:26
  • Seems this link helps some one : http://stackoverflow.com/questions/11232853/c2dm-to-google-cloud-messaging-gcm – Renjith K N Oct 07 '15 at 07:09

2 Answers2

6

C2DM should not be used anymore, ever. It's officially phased out in favor of GCM. Google might stop supporting it altogether at some point.

The difference, from implementor's standpoint, is minimal, and GCM is actually easier to integrate with (you don't need to create a dummy Google account, for one thing).

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
  • You do need to create a Google account for devices below a 4.something Android version. Plus you can't get an API key for C2DM anymore, so you couldn't start a C2DM project – NickT Mar 06 '13 at 21:19
  • Under C2DM rules, you need an extra Google account to **send** messages. GCP uses APi keys instead. – Seva Alekseyev Mar 06 '13 at 21:33
  • You are correct, however for lower versions of Android OS you also need a Google account on the receiving device for GCM. I would think that there must be thousands of emulator AVDs with accounts in the name of some version of 'Mickey Mouse'. I have at least 2! – NickT Mar 06 '13 at 21:39
2

C2DM -> old version
GCM -> new version

You can't use C2DM any more, you have to use GCM.

Ahmad
  • 69,608
  • 17
  • 111
  • 137