Android SDK Initialization
info

Note

Initialize the SDK on the main thread inside onCreate() and not create a worker thread and initialize the SDK on that thread.
KotlinJava
import com.moengage.flutter.MoEInitializer
import com.moengage.core.MoEngage
...
// `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")
MoEInitializer.initialiseDefaultInstance(context = this, builder = moengage);

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

warning

Critical

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.

Previous

Next

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

How can we improve this article?