How to configure Push notifications for Android?

Created by Akhilesh Sirvi, Modified on Mon, 22 Mar 2021 at 04:57 PM by Akhilesh Sirvi

- Sign into Firebase using your Google account.


- Create a Firebase project


  1. In the Firebase console, click Add project, then select or enter a Project name.

    If you have an existing Google Cloud project, you can select the project from the dropdown menu to add Firebase resources to that project.

  2. (Optional) If you are creating a new project, you can edit the Project ID.

    Firebase automatically assigns a unique ID to your Firebase project.

  3. Click Continue.

  4. (Optional) Set up Google Analytics for your project, which enables you to have an optimal experience using any of the following Firebase products:

    You can always set up Google Analytics later in the Integrations tab of your settings Project settings.
  5. Click Create project .


* Above process is same for ios and android application push notification.



Register your app with Firebase

- Go to the Firebase console.


- Select the project that you created



- In the center of the project overview page, click the Android icon or Add app to launch the setup workflow.

   Enter your app's package name in the Android package name field.

What's a package name, and where do you find it?

->  A package name uniquely identifies your app on the device and in the Google Play Store.

-> A package name is often referred to as an application ID.

-> Find your app's package name (like "com.companyName.serviceName")

-> Be aware that the package name value is case-sensitive, and it cannot be changed for this Firebase           Android app after it's registered with your Firebase project.


**Make sure to enter the package name that your app is actually using. The package name value is case-sensitive, and it cannot be changed for this Firebase Android app after it's registered with your Firebase project.




- (Optional) Enter other app information: App nickname and Debug signing certificate SHA-1.

App nickname: An internal, convenience identifier that is only visible to you in the Firebase console.

Debug signing certificate SHA-1: Leave it blank.


Download the google-services.json file then click next



Click continue to console



Click next.


Continue to console.


How to add google-services.json file in Android App ?


- Go to Android app code directory 

- Go to cordova directory and put the downloaded google-services.json file (If it is already exist replace it).

( cordova/google-services.json ) 


How to find server key ?

- Go to the Firebase console.


- Select the project


- Click on app created in previous step 


- Click on setting icon


- Go to cloud messaging tab 


- Copy the server key


- Go to the worksuite/ worksuite-saas setting -> rest api setting page



- Enter the key and save that setting.

Now rest api is connected with firebase push notification to send push notification




Connect android application code with firebase to receive push notification to android device.


Go to the android app code directory


Go to cordova directory 


Copy the google-service.json file that you download from firebase when you create android app in firebase 

and paste it to cordova directory




Now Android app user ready to receive push notification


Now you need to build the application apk.




* if still, you are not able to receive a push notification on a mobile device then follow these steps 



go to the Cordova directory in the terminal and run 
cordova -v

it will show the Cordova version if it does not show then open a terminal and follow the below document and run those commands 

then check cordova -v it will show the Cordova version

then run the following commands

cordova platform rm android
cordova platform add android

then build the application again then check you will get the notification


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article