How to Setup Firebase Cloud Messaging

Google recently moved most of its services(like analytics, cloud messaging etc.) to firebase platform, they say firebase has more functionality and performance. so going forward they will support only firebase applications.

So we at Androapp are also migrating to firebase for push notifications.

If you had setup google cloud messaging earlier for your app, than you have to migrate your existing project to firebase, click here for the instruction on how to migrate.

Continue here for setting up a fresh firebase project for push notifications.

  1. Go to
  2. Click on Create New Project button
  3. Fill up the name and select the region, click on Create Project buttonscreen-shot-2016-10-02-at-1-53-56-pm
  4. Click on Add Firebase to your android appscreen-shot-2016-10-02-at-9-30-07-am
  5. Give the package name, you can get this value in your first email from androapp
  6. Leave the signing certificate SHA-1 field empty and click on Add Appscreen-shot-2016-10-02-at-1-57-24-pm
  7. At this moment, your browser must have downloaded a file with name google-services.json
  8. open that file, it will look like thisscreen-shot-2016-10-02-at-1-59-04-pm
  9. Copy the mobilesdk_app_id value from the file to Google App id textbox in Account Settings Tab. it will look like this: 1:370901340170:android:ce70542cdae49cac
  10. Click on Continue and Finish in next screens.
  11. go to the mobile app you just created and click on the 3 dot menu and select Manage optionscreen-shot-2016-10-02-at-2-02-49-pm
  12. Go to cloud messaging tab and copy the Server key(not the legacy server key) to Google Api Key textbox in AndroApp Account Settings tab.(this is different from what you see in google-services.json, you have to enter the server key from this screen to google api key textbox in AndroApp Settings page and not from google-services.json file)
  13. You are done !!


Related Post

2 thoughts on “How to Setup Firebase Cloud Messaging”

Leave a Reply

Your email address will not be published. Required fields are marked *