Push Notifications

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

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

Configure Gameball With Your Firebase

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

Handling Push Notifications Integration

First, Implement the FirebaseMessagingService Interface and Implement your logic in the onMessageReceived override the method.

public class MyNotificationHandler extends FirebaseMessagingService {
    @Override
    public void onMessageReceived(@NonNull RemoteMessage message) {
        super.onMessageReceived(message);
        //TODO Handle received notification
    }
}

Then, Register the service under application tag in the app's Manifest file.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <application>
        <activity>
            ...
        </activity>
        <service
            android:name=".MyNotificationHandler"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>
    </application>

</manifest>

Your customers can now receive push notifications from Gameball.

Follow this guide to learn more on how to Set up a Firebase Cloud Messaging client app on Android and this guide to learn more on how to Receive messages in an Android app.

Last updated