Android SDK Initialization
 

NOTE

Initialize the SDK on the main thread inside onCreate() and not create a worker thread and initialize the SDK on that thread.
KotlinJava
// this is the instance of the application class and "YOUR_APP_ID" is the APP ID from the dashboard.
import com.moengage.flutter.MoEInitializer
...
val moEngage: MoEngage.Builder = MoEngage.Builder(this, "YOUR_APP_ID")
MoEInitializer.initialiseDefaultInstance(moengage);

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

 

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.
Was this article helpful?
0 out of 0 found this helpful