SDK Integration
Onboarding Checklist: Android
Please find the Onboarding Checklist for iOS and Android below. Follow the titles in the checklist to ensure you have completed each essential step in your onboarding process with Netmera.
Step 1: Select a Platform
Navigate to Developers > Netmera Onboarding.
Select Android and click Start to proceed.

Step 2: Create a Firebase Configuration
Netmera uses Firebase Cloud Messaging (FCM) for delivering push notifications.
Go to the Firebase Developers Console and create a new project.
Generate a new Private Key (JSON file) for your project.
Upload the JSON file you downloaded from Firebase Cloud Messaging to the
Project > app-level rootdirectory.

Choose one of the four options: Node.js, Java, Python, and Go. The choice of option does not require any action. Simply click the 'Generate New Private Key' button to download the file. No further selections are needed.

Upload this file in Netmera Panel > Developers > Netmera Onboarding > Android > Step 2: Create A Firebase Configuration > FCM Service Account Key.

Step 3: Select a Target SDK
Select the SDK for your application development framework as Native Android.

Step 4: Integrate Netmera SDK
Standard Gradle
If your project is using Standard Gradle:
Add the following snippets to integrate the Netmera SDK into your project.
In this step, only copy the url specified below and add it to maven.
You should add Netmera dependency to your dependencies section in your: build.gradle(:app)
Netmera BOM (Bill of Materials) Support
Using the BOM allows you to manage Netmera SDK versions more easily and ensures compatibility between nmcore, nmfcm, and nmhms modules.
Gradle Version Catalogs
If your project is using Gradle Version Catalogs:
Add the following snippets to integrate the Netmera SDK into your project.
Kotlin
If you want to integrate Huawei Mobile Services (HMS), add the following configuration to your build.gradle file before plugins. Following part is only for Huawei integration.
For more information, visit the following link: Huawei AppGallery Connect Guide.
Note: Check your libs.versions.toml file:
This file is usually located within the
gradlefolder in the root directory of your project.Review how the relevant plugin is defined.
Netmera BOM (Bill of Materials) Support
Using the BOM allows you to manage Netmera SDK versions more easily and ensures compatibility between nmcore, nmfcm, and nmhms modules.
In this step, only copy the url "https://release.netmera.com/release/android" and add it to maven.
Netmera BOM (Bill of Materials) Support
Using the BOM allows you to manage Netmera SDK versions more easily and ensures compatibility between nmcore, nmfcm, and nmhms modules.
Groovy
If you want to integrate Huawei Mobile Services (HMS), add the following configuration to your build.gradle file before plugins. Following part is only for Huawei integration.
For more information, visit the following link: Huawei AppGallery Connect Guide.
Note: Check your libs.versions.toml file:
This file is usually located within the
gradlefolder in the root directory of your project.Review how the relevant plugin is defined.
Netmera BOM (Bill of Materials) Support
Using the BOM allows you to manage Netmera SDK versions more easily and ensures compatibility between nmcore, nmfcm, and nmhms modules.
In this step, only copy the url "https://release.netmera.com/release/android" and add it to maven.
Netmera BOM (Bill of Materials) Support
Using the BOM allows you to manage Netmera SDK versions more easily and ensures compatibility between nmcore, nmfcm, and nmhms modules.
Step 5: Initialize Netmera SDK
Initialize Netmera SDK
Add the following initialization code inside the
onCreate()method of yourApplicationclass.
Configure netmera-config.json
Create
netmera-config.jsonin your app'sassets/directory.Add the sender IDs for the messaging services your app supports.
Optionally configure the in-app message animations.
Netmera reads this file automatically during initialization.
Optional: Initialization Callback
To implement the initialization callback:
Add the following code to handle success and failure:
Optional: Enable Logging
Use NetmeraLogLevel to control how much the SDK writes to logcat. The available levels are DEBUG, INFO, ERROR and NONE. The default level is ERROR, so SDK error messages appear in logcat unless you set the level to NONE. Use DEBUG only for debugging during development.
Set the log level at initialization: pass the optional logLevel parameter to Netmera.init(params, logLevel) or Netmera.initWithHoldingOperation(params, logLevel).
Change the log level at runtime: call Netmera.setLogLevel(level).
If you initialize the SDK with NetmeraConfiguration, use NetmeraConfiguration.Builder.logLevel(level) instead.
Android SDK Integration Complete
The Android SDK integration has been successfully completed, and your devices are now set to receive the following types of push notifications via the Netmera Dashboard:
Standard Push Notifications
Interactive Push Notifications
Widgets
Push Notifications with Deeplinks
Last updated
Was this helpful?