InformationYou can now get notified whenever MoEngage releases a new version of the Android Native SDK. For more information, refer to Subscribe to MoEngage SDK Releases.
Overview
Starting from Android SDK core version 14.04.03 and later, MoEngage recommends using the Bill of Materials (BOM) to integrate the Android SDK. By defining a single BOM version, you ensure that all MoEngage modules, such as Push Kit, Rich Media, and Geofence, automatically use compatible versions. BOM simplifies dependency management, prevents version conflicts, and eliminates the need to manually track version numbers for each individual artifact.Add the BOM to your application
To integrate the BOM, add theandroid-bom dependency to the application-level build.gradle file. The version number is specified only in this dependency.
<bomVersion> with the relevant version number. For more information on BOM versions, refer to the Android SDK release notes.
Add MoEngage Modules
Once the BOM is configured, include the specific MoEngage modules required for the application.Note: Version numbers are not required for these dependencies; the BOM automatically manages them.
InfoWhile MoEngage strongly recommends using the BOM for seamless dependency management, you can opt to manually configure versions for each artifact. If you choose this approach, you must ensure that the versions of all integrated modules are compatible with one another.To find the latest versions and compatible artifact combinations, please refer to the Installing SDK using Artifact Id.
Add Androidx Libraries
The SDK depends on a few Androidx libraries for its functioning. Add the below Androidx libraries in your application if not done already.Impact of using BOM
Using the BOM does not increase the application size. It functions strictly as a version manager to ensure compatibility. Only the specific modules included in thedependencies block (e.g., push-kit, android-sdk) are bundled into the application.
Why use BOM?
- Simplified Versioning: Eliminates the need to manage individual artifact versions. Updating the BOM version updates the entire integration.
- Compatibility: The BOM ensures that all integrated modules work efficiently together, preventing runtime crashes caused by mismatched library versions.
- Cleaner Configuration: Maintains a clean
build.gradlefile with a single source of truth for the SDK version.