> For the complete documentation index, see [llms.txt](https://docs.hackle.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hackle.io/en/development-guide/react-native/push-message/rn-android-push-message.md). Agents can also search and read this documentation through its [MCP server](https://docs.hackle.io/~gitbook/mcp).

# Android Push Message Integration

Integrate Firebase with the Hackle SDK to receive Hackle Push Messages in your React Native Android app.

{% stepper %}
{% step %}

### Integrate Firebase Project

To use Push Messages in your Android app, you need to integrate your Hackle Workspace with a Firebase project.

{% content-ref url="/pages/EnrApWvzWfZ7innLv6Le" %}
[Android FCM Integration](https://docs.hackle.io/en/external-link/crm-channels/fcm-integration.md)
{% endcontent-ref %}
{% endstep %}

{% step %}

### Integrate Firebase Cloud Messaging SDK

Complete the Firebase setup in the `android` directory of your React Native project by referring to the [Firebase Cloud Messaging Installation Guide](https://firebase.google.com/docs/cloud-messaging/android/client).
{% endstep %}

{% step %}

### Integrate with the Hackle SDK

Refer to [SDK Integration](https://docs.hackle.io/en/development-guide/react-native.md) to add the Hackle SDK dependency and initialize the SDK.

{% hint style="info" %}
Once the SDK integration is complete, the push token is automatically collected when the app launches.\
Push reception and push click handling also work without additional code.
{% endhint %}

{% hint style="warning" %}
On Android 13 (API 33) and above, Push Messages are displayed only after the user grants the notification permission (`POST_NOTIFICATIONS`).\
Declare the permission in `AndroidManifest.xml` and request it in your app.
{% endhint %}
{% endstep %}

{% step %}

### Test Push Messages

**Verify Token**

* You can verify the token configured on an Android device through [User Explorer](https://docs.hackle.io/en/development-guide/react-native/react-native-user-explorer.md).
* You can verify the Android push token assigned to a specific user through [User Profile](https://docs.hackle.io/en/user-view/user-profile.md).

**Test Sending**

* Refer to the [Push Message Test Send Guide](https://docs.hackle.io/en/crm-marketing/push-message-guide/create-campaign.md#id-3-1) to verify Push Messages on an Android device.
  {% endstep %}

{% step %}

### Receive Push Messages

When a push is received, an icon is displayed in the status bar and notification center.

* On Galaxy smartphones, the app icon is displayed.
* On other Android smartphones or emulators, a white circle icon is displayed.
* If you use the [Push Message Icon Change](#push-message-icon-change) feature, the changed icon is displayed.
  {% endstep %}
  {% endstepper %}

## Deep Link Navigation

For handling links when a Push Message is clicked, see [Deep Links](https://docs.hackle.io/en/development-guide/react-native/react-native-deeplink.md).

## Push Message Icon Change

You can change the push icon using the app's local resources by assigning resources to pre-defined keys in `android/app/src/main/AndroidManifest.xml`.

{% hint style="warning" %}
Due to Google policy, icons that include color cannot be set as push icons on standard Android smartphones.
{% endhint %}

{% hint style="info" %}
For details on small\_icon, large\_icon, and color, refer to the [Android Push Design Guide](https://developer.android.com/design/ui/mobile/guides/home-screen/notifications?hl=ko#notification-header).
{% endhint %}

<table><thead><tr><th width="400">key</th><th>Description</th></tr></thead><tbody><tr><td><code>io_hackle_android_default_notification_small_icon</code></td><td>Sets the small icon.</td></tr><tr><td><code>io_hackle_android_default_notification_large_icon</code></td><td>Sets the large icon.</td></tr><tr><td><code>io_hackle_android_default_notification_color</code></td><td>Sets the small icon background color.</td></tr></tbody></table>

{% code title="android/app/src/main/AndroidManifest.xml" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">
    <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
    <application
        android:name=".MainApplication"
        >
       ...
       <meta-data
            android:name="io_hackle_android_default_notification_small_icon"
            android:resource="@drawable/ic_push_small"/>

       <meta-data
            android:name="io_hackle_android_default_notification_large_icon"
            android:resource="@drawable/ic_push_large"/>

       <meta-data
            android:name="io_hackle_android_default_notification_color"
            android:resource="@color/pie" />
       ...
    </application>
</manifest>
```

{% endcode %}

### Changing the Push Message Icon from the Dashboard

When a push icon is configured in the Dashboard, the large icon of the push changes.\
If a push icon is set via local resources and a push icon is also sent from the Dashboard, the icon configured in the Dashboard is used.

## Push Channel Support

You can receive Hackle Push Messages through a notification channel created in advance in your app.\
If a push is received with a channel ID that does not exist in the app, it is received through the default channel provided by Hackle.

Create channels at app startup, such as in `onCreate` of `MainApplication`.\
For how to create channels, see the [Android Developer Documentation](https://developer.android.com/develop/ui/views/notifications/channels?hl=ko).

{% hint style="info" %}
To display a notification popup when a push is received, as on iOS, set the push channel importance to `IMPORTANCE_HIGH`.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hackle.io/en/development-guide/react-native/push-message/rn-android-push-message.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
