SDK Initialisation 11.x.x

SDK Configuration

Get the Workspace 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 onCreate().

info

Note

Initialize the SDK on the main thread inside onCreate() and not create a worker thread and initialize the SDK on that thread.

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

For more information about the detailed list of possible configurations, refer to the API reference.

info

Note

All the configurations are added to the builder before initialization. If you are calling initialize at multiple places, ensure that all the required flags and configurations 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.

Details of the different data centers and dashboard hosts

Data Center Dashboard host

DATA_CENTER_1

dashboard-01.moengage.com

DATA_CENTER_2

dashboard-02.moengage.com

DATA_CENTER_3

dashboard-03.moengage.com

warning

Important

The dashboard host URL provides the Data Center information of your account. Ensure that you contact your account manager or email support@moengage.com to know the data center before you change the data center in the Andriod SDK .

Previous

Next

Was this article helpful?
0 out of 0 found this helpful

How can we improve this article?