Skip to content

Instantly share code, notes, and snippets.

@pjnovas
Created May 30, 2014 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjnovas/a3f7a742a6a3b3a93410 to your computer and use it in GitHub Desktop.
Save pjnovas/a3f7a742a6a3b3a93410 to your computer and use it in GitHub Desktop.
Configure Google Cloud Messaging (GCM) for a Phonegap App
  1. Go To Google Developers Console
  2. Create a project and enter on its console
  3. Left panel go to APIs & auth -> Credentials
  4. Click Create New Key -> Server Key -> Put the public IP or domain where the server remains (for testing a 0.0.0.0/0. can be used)
  5. Left panel go to APIs & auth -> APIs -> Look for Google Cloud Messaging for Android and turn it ON
  6. Copy the API key generated

Then go ot Google Developers Console at GooglePlay

  1. Choose your app
  2. Left menu -> Services & APIs keys
  3. At section GOOGLE CLOUD MESSAGING (GCM) click on Link a Sender ID
  4. Paste the Server Key
  5. Click OK

You should see somethin like GCM sender ID 123456789 has been linked successfully. More Info

Use that "server Key" from you server implementation when posting a push notification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment