Skip to content

Push notifications

Push notifications are a feature that delivers messages to users' devices even when the app is not running. The app registers device tokens with the Hive Axyl server to secure the send target information, and operators send announcement, event, and marketing messages to the registered tokens.

This document explains how to implement the push notification feature in a Unity app client.

Features

The features that push notifications provide are as follows.

Device token registration and management

A device token is a value that identifies the device that receives push messages, and an OS push service such as FCM (Firebase Cloud Messaging) issues it. The app registers the token issued by the OS push service with the Hive Axyl server. Change the language and notification consent of a registered token when needed, and when the app should no longer receive notifications targeted at the user, for example after logout, detach the user.

Notification consent is divided into three items, informational notifications, advertising notifications, and nighttime advertising notifications, and is managed per token. Pass the consent values of the three items together when you register a token, and when the user changes the settings, update them with Change notification consent.

Sending pushes

You send push messages from the Hive Console or with the server API; the app client is not the sender. For the server send API, see Hive Axyl Push Server API.

Push reception handling

How to handle messages that arrive while the app is running, and how to handle cases where the user taps a notification to launch the app (cold start), are explained in Push reception handling (Android) for Android and Push reception handling (iOS) for iOS.

Implementation order

  1. Install and initialize the push module.
  2. Set up the integration for each OS — FCM for Android and APNs for iOS.
  3. Get a device token issued by the OS push service — FCM token issuance for Android and APNs token issuance for iOS.
  4. Register the issued token with the Hive Axyl server. On iOS, also use the push environment value you checked in APNs token issuance.
  5. Handle arriving messages — Push reception handling (Android) for Android and Push reception handling (iOS) for iOS.
  6. When the user changes the settings or logs out, change the token settings.

Next steps

Install the Hive Axyl SDK push module.