Android SDK Initialisation

SDK Configuration

Get APP ID from the Settings Page Dashboard --> Settings --> App --> General on the MoEngage dashboard and initialize the MoEngage SDK in the Application class's onCreate()

 

NOTE

It is recommended that you initialize the SDK on the main thread inside onCreate() and not create a worker thread and initialize the SDK on that thread.
C#
MoEngage.Builder builder = new MoEngage.Builder(this, "XXXXXX");
MoEInitializer.Initialize(builder.Build());
 

IMPORTANT

All the configurations 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 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 RedirectDataToRegion() to set the region.

C#
MoEngage.Builder builder = new MoEngage.Builder(this, "XXXXXX")
  .RedirectDataToRegion(MoEngage.DATA_REGION.RegionEu)
MoEInitializer.Initialize(builder.Build());
Was this article helpful?
0 out of 0 found this helpful