Messaging

interface Messaging

Messaging feature — register and manage push-notification tokens.

Consumer apps handle their own Firebase / APNs setup and obtain device tokens independently. Use this interface to share those tokens with the AFCore backend so the server can deliver push notifications.

Typical flow

  1. App obtains an FCM / APNs token via its own Firebase configuration.

  2. Call updateToken with the token and a stable device identifier.

  3. On logout or device deregistration, call deleteToken.

Functions

Link copied to clipboard
abstract suspend fun deleteToken(deviceId: String): Boolean

Removes the device’s push-notification association on the backend.

Link copied to clipboard
abstract suspend fun getToken(): String?

Retrieves the current FCM token from the server.

Link copied to clipboard
abstract suspend fun updateToken(token: String, deviceId: String): Boolean

Updates the device’s FCM token on the backend.