Skip to main content
Setting up iOS too? See Set up iOS push notifications.

Before you begin

  • Delivery — Delivery must be enabled in your workspace.
  • Parent model — Delivery must have a parent model selected in the Data source card on Delivery > Settings > Profiles. Push notifications are addressed to users by its primary key.
  • Firebase project — Your app must be registered in a Firebase project, and you need access to its Project settings to create a service account key.
  • Test device — Use a device or an emulator with Google Play services.
  • Android 5.0 or later — The SDK supports API level 21 and later.

Collect your Firebase credentials

Hightouch sends notifications through Firebase Cloud Messaging (FCM) on your behalf, using two values from your Firebase project. The service account key is a private credential. Upload it to Hightouch and don’t commit it to your app’s repository.

Create an Android event source

The SDK sends device registrations and notification opens to a Hightouch event source of type Android. Skip this section if your workspace already has one.
  1. Go to Event Collection > Event sources and click Create source.
  2. Click Android and finish creating the source.
  3. On the source’s Setup tab, copy the Write key and the API Host.
A workspace can have only one Android event source for push.

Register your app in Hightouch

  1. Go to Delivery > Settings > Apps. If you already registered this app for iOS, open it and skip to the next step. Otherwise, click Add, enter a Name, and click Add. The name appears on every notification.
  2. On the Android (FCM) card, click Enable.
  3. Enter your Firebase credentials, then save.
  4. Copy the App ID from the top of the Android (FCM) card.
Hightouch connects the app to your event source when you enable it.
You can’t disable a platform after you enable it. To delete an app, contact Hightouch support.
The App ID isn’t your app’s package name or bundle ID. It’s an ID that Hightouch assigns.

Configure your Android project

Add Firebase to your app

If your app doesn’t use Firebase yet, follow Add Firebase to your Android project: download google-services.json into your app module and apply the Google Services Gradle plugin. The Hightouch SDK includes Firebase Cloud Messaging, so you don’t need to add it separately.

Install the SDK

The SDK is published on JitPack. Add the JitPack repository in settings.gradle.kts:
Then add the SDK to your app module’s build.gradle.kts:
This also brings in the Hightouch Android SDK for events.

Set a notification icon

Android needs a small icon to display a notification. Declare one in AndroidManifest.xml, inside <application>:
Use a white, transparent-background icon. Without one, the SDK falls back to your app’s launcher icon. If neither exists, the notification isn’t shown.

Declare the notification permission

Android 13 and later require the POST_NOTIFICATIONS permission to show notifications. Add it to AndroidManifest.xml, outside <application>:

Initialize the SDK

Initialize HightouchPush in your Application class’s onCreate with your write key, API host, and App ID. Android can start your app in the background to deliver a push, so initializing here makes sure the SDK is ready.
Replace YOUR_API_HOST with the API Host from your event source’s Setup tab, such as eu-west-1.hightouch-events.com, and keep /v1 at the end. If you already create an Analytics instance to track events, pass that one to HightouchPush.initialize instead of creating a second. Its write key must belong to your Android event source. The SDK registers the device with FCM on its own. You don’t need to fetch or forward the token. HightouchPushConfig.Builder takes these options:

Request notification permission

On Android 13 and later, ask the user for permission before you expect notifications to show. You decide when to ask; many apps wait until after onboarding. This example requests it from an activity:
If the user declines, the device stays registered but notifications don’t appear.

Identify users on login and logout

Call identify when a user logs in and logout when they log out:
The user ID must match the user’s primary key in your Delivery parent model. Delivery uses it to find each user’s devices. identify links the device to that user, and logout unlinks it so the device stops receiving their notifications. If you also track events with the Android SDK, call HightouchPush.identify instead of analytics.identify so the device stays linked to the right user.

Handle notification taps

The SDK handles taps on its own. It records the open, follows the notification’s link, and opens your app when there’s no link. To read a notification’s custom data in the activity it opens, call HightouchPush.getCustomData(intent) in onCreate or onNewIntent. By default, the SDK opens https links with Android’s standard link handling, which uses your app’s App Links when they match. To route links yourself, set a URL handler and return true for links you handle:
To let the SDK open links with a custom scheme, such as myapp://, add the scheme to setAllowedProtocols. Keep the handler fast, since it runs on the main thread.

Use the SDK alongside another FCM provider

If your app already has its own FirebaseMessagingService, Android delivers messages to yours instead of the SDK’s. Forward new tokens and messages to the SDK:
handleMessageReceived returns false for messages that didn’t come from Hightouch.

Choose a notification channel

Android groups notifications into channels that users can turn on and off in system settings. By default, Hightouch pushes use a channel named “Push notifications” that the SDK creates for you. To use your own channel, create it in your app, then pass its ID to setNotificationChannelId. A channel’s sound and importance come from the channel, not from the campaign.

Receive silent pushes

A silent push delivers custom data to your app without showing a notification. Set a listener on your config:
The listener runs on a background thread, so it can do short work directly.

Send yourself a test push

Run your app on a device and log in so that identify runs, then send a test from Hightouch. In both places, Validate checks that a device is registered for the user ID you enter. From app settings: Go to Delivery > Settings > Apps, open your app, and click Test. Enter your user ID, click Validate, then click Send test. The test includes an image, so it also checks that rich notifications display. From the campaign editor: Go to Delivery > Campaigns, click Add campaign, and select Push. In the Create a new campaign dialog, select your app under Choose apps to target, choose a brand if asked, and click Continue. Under Content, click Edit and write your message. On the Preview tab, click Send test, enter your user ID, click Validate, then click Send test. If Validate finds no device, you can enter a device token instead. A test that arrives this way means your push credentials work and the device isn’t linked to that user.

Troubleshooting

No active devices found

Validate shows this when no device is registered for the user ID. Check that:
  • appId is the App ID from your app’s Android (FCM) card.
  • Your app calls identify after the user logs in, with the parent model’s primary key.
  • The API host in your SDK setup matches the API Host on your Android event source’s Setup tab.
After you fix any of these, call identify again on the device. To see what your app sends, open your Android event source’s Debugger tab. After identify, you see a CEP Push Token Events event with your user ID and an app_id that matches your App ID. If your app has its own FirebaseMessagingService, also check that it forwards tokens to the SDK.

Validate passes, but no notification appears

Check that the user granted notification permission on Android 13 or later, and that notifications for your app and its channel are turned on in system settings.

No android event source found for this workspace

You see this when you enable the Android (FCM) card before your workspace has an Android event source. Create an Android event source, then click Enable again. If your workspace has more than one Android event source, contact Hightouch support.

Next steps

Last modified on November 24, 2026