MoEngage Docs

Push Notification

Configuring your MoEngage Account

Copy the Sever Key from the GCM/FCM console and add it to the MoEngage Dashboard(Not sure where to find the Server Key refer to Getting FCM/GCM Server Key ). To upload it, go to this link and add the Server Key(named as GCM key) and package name.
Please make sure you add the keys both in Test and Live environment.

Adding meta for push notification

Along with the App Id and the notification small icon large icon and sender id(only if using GCM library) to the builder.

MoEngage moEngage =
        new MoEngage.Builder(this, "XXXXXXXXXX")

Notification Small Icon Guidelines

Notification small icon should be flat, pictured face on, and must be white on a transparent background. Refer to the developer docs for more details.

Push Token Registration by MoEngage

Please skip this section if your application is handling push token registration.

Push token registration is a very vital part of push notification, without push token one cannot send out push notifications. The MoEngage SDK registers for push token by default.

You can get the push token from MoEngage SDK by implementing PushManager.OnTokenReceivedListener in your Application class
Note: Available from SDK v6.0.19

public class DemoApp extends Application implements PushManager.OnTokenReceivedListener{
  public void onCreate() {
  @Override public void onTokenReceived(String token) {
		//save token for your use


We highly recommend you to use MoEngage's Push registration. Push registration fails many times and due to network/server issues, MoEngage SDK has fallback mechanisms to retry and minimize this failure.

Push Token Registration by your application.

Please skip this section if you are letting MoEngage SDK handle push token registration.

If your application wants to register for push token and pass the token to MoEngage SDK,
the application should pass the token to MoEngage SDK from the Registration Service used for getting the push token.

PushManager.getInstance().refreshToken(getApplicationContext(), token);

This should be called as soon as the application registers for push token.

Along with passing the push token to the SDK make sure you opt out of push token registration in the MoEngage initialising builder.

MoEngage moEngage = new MoEngage.Builder(this, "XXXXXXXXXX")

Please make sure token is passed to MoEngage SDK on Application update. It is very important when migrating to MoEngage.

What's Next

Based on whether you are using GCM/FCM move to library specific configuration.

Configuring GCM
Configuring FCM