Android Push Notifications

Below, we’ll show you how to send push notifications and/or push messages to your customers, with Firebase Cloud Messaging (FCM) in Acquire.

Step 1. Enable Google services for your app

If you already have a Firebase project with notifications enabled you can skip to the next step. Otherwise go to the FCM Console page and create a new project following these steps:

Give the project a name and click ‘Create Project’.

Once your project is set up, scroll down and select ‘Get started’ on the ‘Notifications’ card.

Enter your app’s package name and click ‘Add App’.

Step 2. Setup client to receive push

Your google-services.json should automatically download. You’ll need to move that into the same directory as your application level build.gradle.

In your apps build.gradle you will need to add the following lines to your dependencies:

dependencies {
implementation ''
implementation ''

At the bottom of your build.gradle you must add:

apply plugin: ''

It is important that this is at the very end of the file.

Call below sdk method to pass the Firebase token :

AcquireApp.setFireBaseToken([Firebase token],[MutableLiveData liveData]);

Pass null instead of MutableLiveData if you do not required a callback.

Step 3. Add your Server key to Acquire for Android settings

Finally, click the settings cog and select ‘Project settings’, then ‘Cloud Messaging’ and copy your Server key.

Open your Acquire app’s settings and select ‘Push notifications’ under App Settings . Then find the ‘FCM Server key’ section. Here you'll be able to paste and save your Server API key.

Step 4. Setting your FCM icon

If you want to add a custom icon for your notifications, just add an image named chat_icon_aqr_white.png to each of your supported densities. Please note that vector drawables cannot be used here. For example:


Notifications icon design guidelines

We recommend following these material design guidelines for producing this icon.

Add your custom Notification Channel Name:

AcquireApp.getInstance().setNotificationChannelName(String channelName)

Turn off Notification using below method:


Troubleshooting tips

If you’re having trouble getting FCM to work in your app, here's a list of things you should check:

  • Enter your FCM Server key here -> .

  • Check that the notifications are not disabled for your app on your test device. Settings > Sound & Notification > App notifications. This may differ depending on the Android version.

  • Did you specify the correct Push Server API key?

  • Make sure you added your google-services.json file in the correct directory.

  • And as always, you can contact us via Acquire. We're always here to help