SDK Initialization

The SDK initialization required by MoEngage

SDK Configuration

Get APP ID from the Settings Page of the dashboard Dashboard --> Settings --> App --> General on the MoEngage dashboard and initialize the MoEngage SDK in the Application class's onCreate()
Note: Initialize the SDK on the main thread inside onCreate() and not create a worker thread and initialize the SDK on that thread.

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

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



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.

Data Redirection

In case your app wants to redirect data to a specific zone due to any data regulation policy please configure the zone in the MoEngage initializer object. Use the setDataCenter() in the MoEngage.Builder to specify the data center.

Reach out to your account manager or drop us an email at [email protected] to know the right data center for you in case of any data restriction.

Following is the mapping for different data centers and dashboard hosts -

Data CenterDashboard Host / / /



Refer to the dashboard host to know the Data Center of your account.
Please make sure that you consult with MoEngage team before using this method for changing the data center in the SDK .