Step 1. Set up the integration
Enter the FCM credentials you prepared in the Firebase console in the Hive Console to lay the groundwork for push integration, and install the dedicated plugin to set up the environment for implementing Android remote push.
1. Set up the Firebase console
In the Firebase console, create the FCM (Firebase Cloud Messaging) credentials to connect to the Hive Axyl push service. For details, see the push settings document in the console guide.
To receive remote push notifications on Android, you must connect your Firebase project to your Android app and prepare the Firebase configuration file needed for the app build.
- Add the Android app to the Firebase project and register its package name.
- Prepare the server credentials to use for sending with FCM.
- Download the
google-services.jsonfile from the project settings in the Firebase console. - The minimum supported version is Android 10 (API 29). Check the Minimum API Level in Unity Player Settings.
2. Configure the Hive Console
Register the FCM credentials you created during the Firebase console setup in the Hive Console so that the Hive Axyl push server can send push messages to Android devices. For details, see the push settings document in the console guide.
In the Hive Console, enable the FCM push method and register the values needed to send pushes, such as the project and server credentials you prepared in the Firebase console.
3. Install the Hive Axyl FCM plugin
Install the 'FCM plugin' provided by the Hive Axyl SDK.
For Android remote push, you use the FCM plugin to get a device token issued and to handle messages received while the app is running and notification tap events.
Add the package to the project's dependencies field as in the following example.
"dependencies": {
"com.hive.axyl.core": "PLACEHOLDER_AXYL_CORE_VERSION",
"com.hive.axyl.push": "PLACEHOLDER_AXYL_PUSH_VERSION",
"com.hive.axyl.push.addon.fcm": "PLACEHOLDER_AXYL_PUSH_FCM_VERSION"
}
Because the plugin uses the native Firebase Messaging SDK directly, you do not need to install the Firebase Unity SDK separately. The plugin also automatically merges the Android manifest entries needed to receive pushes at build time, so the app does not need to add anything.
Warning
If the app already uses the Firebase Unity SDK for other purposes (such as analytics), disable its messaging (Firebase Cloud Messaging) feature. If the message receiving service is registered twice, there is no guarantee which one receives the notifications.
Include google-services.json
Include the google-services.json file you downloaded from the Firebase console in the app. Without this file, Firebase is not initialized and token issuance fails. Place the file in the app module location (Assets/Plugins/Android/<app-module>/).
Request notification permission
To display notifications on Android 13 (API 33) or later, the POST_NOTIFICATIONS runtime permission is required. The SDK currently does not provide a permission request feature, so the app requests it directly. You can implement it with the standard Unity API.
Next steps
Implement Step 2. Request push notification permission.