campaign |
Notice Microsoft is replacing Xamarin with .NET MAUI and the supported for the latest release of Xamarin is till November 2023. MoEngage will stop providing updates for the MoEngage Xamarin SDK due to the deprecation. Deprecation impacts Xamarin In-App Messaging and will stop working after June 2022. All other features will continue to work in the Xamarin SDK until November 2023. |
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()
info |
Note It is recommended that you initialize the SDK on the main thread insideonCreate() and not create a worker thread and initialize the SDK on that thread. |
MoEngage.Builder builder = new MoEngage.Builder(this, "XXXXXX");
MoEInitializer.Initialize(builder.Build());
warning |
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.
MoEngage.Builder builder = new MoEngage.Builder(this, "XXXXXX")
.RedirectDataToRegion(MoEngage.DATA_REGION.RegionEu)
MoEInitializer.Initialize(builder.Build());