MoEngage Docs

SDK Initialization

The SDK initialization required by MoEngage

SDK Configuration

Get APP ID from the Settings Page on the MoEngage dashboard and initialize the MoEngage SDK in the Application class's onCreate()

// this is the instance of the application class and "XXXXXXXXXXX" is the APP ID from the dashboard.
val moEngage =
        new MoEngage.Builder(this, "XXXXXXXXXXX")
        .build();
MoEngage.initialise(moEngage);
// this is the instance of the application class and "XXXXXXXXXXX" is the APP ID from the dashboard.
MoEngage moEngage =
        new MoEngage.Builder(this, "XXXXXXXXXXX")
        .build();
MoEngage.initialise(moEngage);

Refer to the API reference doc for detailed list of possible configuration.

Note

All the configuration should be added to the builder before calling initialize. If you are calling initialize at multiple places please ensure that all the required flags and configuration are set each time you initialize to maintain consistency in behavior.

Install/Update Differentiation

We need your help to tell the SDK whether the user has updated the application or installed the application.
You need to have a logic on the app side to distinguish between app INSTALL and UPDATE

//For Fresh Install of App
MoEHelper.getInstance(getApplicationContext()).setAppStatus(AppStatus.INSTALL)

// For Existing user who has updated the app
MoEHelper.getInstance(getApplicationContext()).setAppStatus(AppStatus.UPDATE)
//For Fresh Install of App
MoEHelper.getInstance(getApplicationContext()).setAppStatus(AppStatus.INSTALL);

// For Existing user who has updated the app
MoEHelper.getInstance(getApplicationContext()).setAppStatus(AppStatus.UPDATE);

SDK Initialization


The SDK initialization required by MoEngage

Suggested Edits are limited on API Reference Pages

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