Getting an API key to use with Google Cloud Messaging

I am developing an Android app and I’d like to start testing out push notifications. From a code perspective, I’m all set. My current challenge is that I simply do not know how to get a Google Cloud Messaging API key from Google.

There are loads and loads of tutorials and videos online showing how this can be done in about 10 seconds but Google has recently updated it’s developer center and none of the tutorials seem to apply any more. The current process seems very cumbersome and not at all similar to what I’ve seen online.

  • how to implement both ontouch and also onfling in a same listview?
  • PopupWindow above Virtual keyboard
  • IntentService will be killed after I stop my application
  • Trying to build Android Emulator with ionic fails.. “Class not found: javac1.8”
  • Exception when calling setDataSource(FileDescriptor) method (failed.: status=0x80000000)
  • Set underline text to TextView in android programatically
  • I realize that this barely passes as a programming question (if at all) but there is no way that I’m going to even begin to be able to develop anything without an API key from Google.

    Is someone able to point me in the right direction?

  • Shared Preferences vs Database
  • How to display count of notifications in app launcher icon
  • How can I access my localhost from my Android device?
  • How can one know if an activity is started without a transition?
  • How to send event from Service to Activity with Otto event bus?
  • Android In-App Billing error You need to sign into your google account
  • 4 Solutions collect form web for “Getting an API key to use with Google Cloud Messaging”

    but Google has recently updated it’s developer center and none of the tutorials seem to apply any more

    :: sigh ::

    That’s yet more work for my next book update…

    The current process seems very cumbersome and not at all similar to what I’ve seen online.

    Bearing in mind that I am already set up with keys, and therefore may be seeing somewhat different stuff than would somebody with no keys:

    Step #1: Log into https://cloud.google.com/console with your Google account

    Step #2: In the navigation on the left, go into “APIs & auth > APIs”

    Step #3: Find “Google Cloud Messaging for Android” and click the “OFF” button next to it (note: this might involve then agreeing to additional terms of service)

    Step #4: In the navigation on the left, go into “APIs & auth > Registered apps”

    Step #5: Wait a really long time, apparently.

    Step #6: Click the red REGISTER APP button.

    Step #7: Give the app a name and choose Web Application, then click Register

    Step #8: Click the “Server Key” section for your server key

    CommonsWare was right about three years ago (2013). This is a revision to his answer.

    Note: Even if you have already enabled any services and have API keys this will still work.

    1. Log in to Google Services with your google account. (This is not the same as the Google Console)

    2. Click on Pick a Platform

    3. Click on Enable services for Android

    4. Fill out the app name and package name

    5. Select Cloud Messaging. (Or any other service you want. You can come back to this later and add more)

    6. Click on Generate Configuration Files

    7. Boom. Right there on top in the Cloud Messaging card under Server API key

    8. Also, you will want to download the google-services.json file and copy it to the app/ or mobile/ module directory in your Android project

    Google has updated their api console recently to Google Cloud Console.
    In short terms , you need to create an Android application and pick Accessing APIs via a web server. this service has a detailed guide for that

    The easiest way to configure GCM API key and Sender ID, is to Google login with your account and continue the Wizard : https://developers.google.com/mobile/add 🙂

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.