Referd Developers Guide
  • Referd Developers Docs
  • Introduction
  • Installing Referd
    • iOS
      • Getting Started
      • Initialize Referd User Profile
      • Track User Events
      • Push Notifications
      • Go-Live Checklist
    • Android
      • Getting Started
      • Initialize Referd User Profile
      • Track Referd Events
      • Push Notifications
      • Go-Live Checklist
    • React Native
      • Getting Started
      • Initialize Referd User Profile
      • Track User Events
      • Push Notifications
      • Go-Live Checklist
    • Flutter
      • Getting Started
      • Initialize Referd User Profile
      • Track User Events
      • Go-Live Checklist
    • Generic Mobile App
      • Initialize Referd User Profile
      • Track User Events
      • Push Notifications
      • Go-Live Checklist
  • REST API
    • Overview
    • Authentication
    • API Reference
      • User
      • Event
      • Notifications
    • API Endpoint Testing
    • Errors
Powered by GitBook
On this page
  • Configure Referd With Your Firebase
  • Handling Push Notifications Integration
  1. Installing Referd
  2. Android

Push Notifications

Integrate your app with Referd push notifications and interactive in-app messaging.

Last updated 1 year ago

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

Configure Referd With Your Firebase

Handling Push Notifications Integration

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

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

    // TODO: your code here
}
override fun onMessageReceived(message: RemoteMessage) {
    super.onMessageReceived(message)
    
    if (GameBallApp.getInstance(this).isGameBallNotification(remoteMessage)) 
        return

        // TODO: your code here
}

Your users can now receive push notifications from Referd.

Before you start, you must configure your Firebase on your Referd account. Follow the steps in article from our Help Center related to push notifications.

Configure your Firebase account on Referd for mobile push notifications