MoEngage Docs

Configuring FCM

Before configuring GCM please make sure General Push Configuration is completed.

Please make sure you have a completed Firebase Setup before proceeding further time.

In Firebase version 17.1.0 there was a change in the Push Token registration mechanism. Below were the changes made:

  1. Deprecated the getToken method of FirebaseInstanceId in favour of the newly-introduced getInstanceId.
  2. Deprecated the FirebaseInstanceIdService class in favour of overriding the onNewToken method of FirebaseMessagingService.

Latest version of MoEngage SDK(9.2.00 and above) is compiled with 17.3.2 hence expecting the client app to use Firebase version 17.3.2. However, we do support versions below 17.1.0.

Adding Listener Service

In case MoEngage is the only push provider you can use the firebase services provided by the MoEngage SDK. To use the service add the following snippet in your manifest file.

In case you are migrating from an older version of Firebase library(17.3.2 and below) remove the already added Firebase listener/service provided by MoEngage SDK and add the below.

    <service android:name="com.moengage.firebase.MoEFireBaseMessagingService">
        <action android:name=""/>

Using your own listener service

In case you have multiple push providers you should have only one service in your manifest file and pass on the payload to all providers. To pass payload to MoEngage SDK use the following snippet

public class FireBaseMessagingListenerService extends FirebaseMessagingService {
  @Override public void onMessageReceived(RemoteMessage remoteMessage) {
    if (remoteMessage != null){
      Map<String, String> pushPayload = remoteMessage.getData();
      if (MoEngageNotificationUtils.isFromMoEngagePlatform(pushPayload)){
        PushManager.getInstance().getPushHandler().handlePushPayload(getApplicationContext(), pushPayload);
      }else {
        //your own logic


At any point your application's manifest should have only one service with intent filter and one service with intent filter If there are more than one service with either of the intent filters it could lead to poor notification delivery.

Testing Push Notification

Refer to this link to read more about how to create and test push notifications.

Configuring FCM

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.