How to Setup Firebase Cloud Messaging

Follow below steps for setting up a fresh firebase project for push notifications.

  1. Go to
  2. Click on Add Project
  3. Enter the Project Name and click on Continue
  4. Disable Google analytics and click on Create Project
  5. Wait for a bit till it creates your project and click on Continue
  6. Click on Android icon to add firebase to your Android App
  7. Give the package name, you can get this value in your first email from androapp
  8. Give your app a nickname if you wish
  9. Leave the signing certificate SHA-1 field empty and click on Register App
  10. Click on Download google-services.json file
  11. open that file, it will look like thisscreen-shot-2016-10-02-at-1-59-04-pm
  12. Copy the whole file and paste it in the text box in Account Settings tab
  13. Note: please update the plugin if you don’t see the textbox.
  14. Come back to firebase page and Click on Next and Finish in next screens.
  15. No need to press sync now and click on Next
  16. Click on Continue to Console button
  17. You should be able to see your app with the nickname you entered on the top
  18. Click on that and click on settings icon
  19. Go to Service Accounts tab and click on Generate new private key button
  20. Download this file to your server and update the file path in textbox in Firebase Api Settings section on AndroApp->Account Settings tab on your wordpress admin dashboard.
  21. you might need to enable Firebase Cloud Messaging api from{project_number}
  22. replace {project_number} from Google Api you extracted earlier, i.e. 370901340170 from 1:370901340170:android:ce70542cdae49cac
  23. Create a new APK and test the push notifications, go here for troubleshooting push notification.

Here are the old instructions to follow for v0 api (just in case you need) to be followed after step 17).

  1. Go to cloud messaging tab and copy the 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)
  2. You are done !!
  3. Create a new APK and test the push notifications, go here for troubleshooting push notification.


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 *