# Push Notifications

Referd uses Firebase to deliver maximum experience in your app. This includes push notifications, interactive in-app messaging.

![](/files/ZHnrdJ6rzJUFpPQPEWxn)

### Configure Referd With Your Firebase

Before you start, you must configure your Firebase on your Referd account. Follow the steps in [Configure your Firebase account on Referd for mobile push notifications](https://help.tryreferd.com/en/articles/8668480-get-your-referd-integration-details) article from our Help Center related to push notifications.

### Handling Push Notifications Integration

Add the following code line to the first line of the **onMessageReceived** method in your **FirebaseMessagingService** class.

{% tabs %}
{% tab title="Java" %}

```java
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
    if (GameBallApp.getInstance(this).isGameBallNotification(remoteMessage))
        return;

    // TODO: your code here
}
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
override fun onMessageReceived(message: RemoteMessage) {
    super.onMessageReceived(message)
    
    if (GameBallApp.getInstance(this).isGameBallNotification(remoteMessage)) 
        return

        // TODO: your code here
}
```

{% endtab %}
{% endtabs %}

Your users can now receive push notifications from **Referd**.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.tryreferd.com/installing-referd/referd-for-android/push-notifications-on-android.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
