Overview
As an alternative to programmatic initialization, you can initialize the SDK using a configuration file. This lets you manage your Workspace ID and data center directly within a native configuration file, keeping them separate from your application logic.If you require programmatic initialization instead, refer to the guide on Manual Initialization.
Add Configuration File
Createmoengage_init_config.xml in your Android library plugin at Assets/Plugins/Android/<YOUR_ANDROID_LIBRARY_PLUGIN>.androidlib/res/values/moengage_init_config.xml and specify your workspace ID and data center:
moengage_init_config.xml
MoEInitializer.initialiseDefaultInstance(application) in your Application class alongside the file-based config. When this file is present, the SDK reads configuration from it at startup. Programmatic initialization takes precedence if both are provided.
Following details of the different data centers you need to set based on the dashboard hosts
For more information about the detailed list of possible configurations, refer to the API reference.
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.