Android Push Notification Implementation with BloomreachCreated at: 30 December, 2025

Introduction
Push notifications help your app engage users effectively. This guide explains how to implement push notifications on Android using Bloomreach(formerly Exponea) from scratch to a working feature.
Prerequisites
- Android app using Kotlin
- Firebase Cloud Messaging (FCM) configured
- Bloomreach account with push enabled
- Basic understanding of Android app lifecycle
High Level Architecture
- App registers with FCM and obtains a device token
- Token is sent to Bloomreach SDK
- Bloomreach sends push campaigns via FCM
- FCM delivers message to device
- App displays notification
Firebase Setup
- Add Firebase to your project via Firebase Console.
- Place
google-services.jsonin yourapp/folder. - Add dependencies in
build.gradle:
implementation platform('com.google.firebase:firebase-bom:33.0.0')
implementation 'com.google.firebase:firebase-messaging-ktx'Apply Google services plugin:
plugins {
id 'com.google.gms.google-services'
}Integrating the Bloomreach SDK (formerly Exponea)
Step 1: Add Exponea SDK
implementation("com.exponea.sdk:sdk:4.8.1")Step 2: Initialize SDK
- Obtain
projectToken,authorization, andbaseURLfrom Bloomreach Engagement portal under Project Settings > Access Management > API - Ensure tracking consent is obtained before initialization
val configuration = ExponeaConfiguration()
configuration.authorization = "Token YOUR_API_KEY"
configuration.projectToken = "YOUR_PROJECT_TOKEN"
configuration.baseURL = "https://api.exponea.com"
Exponea.init(this, configuration)Step 3: Place SDK Initialization
- In your
ApplicationsubclassonCreate()method:
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
val configuration = ExponeaConfiguration()
configuration.authorization = "Token YOUR_API_KEY"
configuration.projectToken = "YOUR_PROJECT_TOKEN"
configuration.baseURL = "https://api.exponea.com"
Exponea.init(this, configuration)
}
}Register your custom application class in AndroidManifest.xml:
<application android:name=".MyApplication">...</application>Push Notifications Setup
Enable Push Notifications
- Bloomreach Engagement sends notifications via scenarios.
- Notifications can be standard alerts or silent for background tasks.
Implement Firebase Messaging Service
import android.app.NotificationManager
import android.content.Context
import com.exponea.sdk.Exponea
import com.google.firebase.messaging.FirebaseMessagingService
import com.google.firebase.messaging.RemoteMessage
class MyFirebaseMessagingService: FirebaseMessagingService() {
private val notificationManager by lazy {
getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
}
override fun onMessageReceived(message: RemoteMessage) {
super.onMessageReceived(message)
if (!Exponea.handleRemoteMessage(applicationContext, message.data, notificationManager)) {
// message from another provider
}
}
override fun onNewToken(token: String) {
super.onNewToken(token)
Exponea.handleNewToken(applicationContext, token)
}
}Register service in AndroidManifest.xml:
<service android:name="MyFirebaseMessagingService" android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>Configure FCM in Bloomreach
- Create a service account in Google Cloud and generate a private key
- In Bloomreach Engagement, add Firebase Cloud Messaging integration using the JSON key

3. Select the integration in Project Settings > Channels > Push Notifications > Firebase Cloud Messaging Integration

After setup, your app can receive push notifications via Bloomreach and track tokens automatically

To read new articles, join my telegram channel @devlogsbyazizkhuja !