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
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") .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 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.
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 Center||Dashboard Host|
|DATA_CENTER_1||dashboard-01.moengage.com / app.moengage.com|
|DATA_CENTER_2||dashboard-02.moengage.com / app-eu.moengage.com|
|DATA_CENTER_3||dashboard-03.moengage.com / app-serv3.moengage.com|
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 .
Updated 4 months ago