Initialize the SDK on the main thread inside onCreate() and not create a worker thread and initialize the SDK on that thread.
For more information about the detailed list of possible configurations, refer to the API reference.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import com.moengage.flutter.MoEInitializer
import com.moengage.core.MoEngage
import com.moengage.core.DataCenter
...
// `this` is the instance of the application class and "YOUR_Workspace_ID" is the Workspace ID from the dashboard.
val moEngage: MoEngage.Builder = MoEngage.Builder(this,"YOUR_Workspace_ID", DataCenter.DATA_CENTER_X)
MoEInitializer.initialiseDefaultInstance(context = this, builder = moEngage)
import com.moengage.flutter.MoEInitializer;
import com.moengage.core.MoEngage;
import com.moengage.core.DataCenter;
...
// `this` is the instance of the application class and "YOUR_Workspace_ID" is the Workspace ID from the dashboard.
MoEngage.Builder moEngage = new MoEngage.Builder(this, "YOUR_Workspace_ID", YOUR_DATA_CENTER);
MoEInitializer.initialiseDefaultInstance(this, moEngage);
| Data Center | Dashboard host |
|---|---|
| DataCenter.DATA_CENTER_1 | dashboard-01.moengage.com |
| DataCenter.DATA_CENTER_2 | dashboard-02.moengage.com |
| DataCenter.DATA_CENTER_3 | dashboard-03.moengage.com |
| DataCenter.DATA_CENTER_4 | dashboard-04.moengage.com |
| DataCenter.DATA_CENTER_5 | dashboard-05.moengage.com |
| DataCenter.DATA_CENTER_6 | dashboard-06.moengage.com |
Was this page helpful?