setPushToken

suspend fun setPushToken(context: Context, deviceToken: String, account: MessengerAccount): Result<Unit>

Registers a device push token with the Genesys Cloud backend for receiving chat notifications.

Return

A Result that succeeds if the token was registered, or carries an com.genesys.cloud.core.utils.NRError describing what went wrong.

Parameters

context

Application context used by the underlying push handler.

deviceToken

The FCM registration token obtained from Firebase Cloud Messaging.

account

A configured MessengerAccount instance. Must be the same account used to build the com.genesys.cloud.ui.structure.controller.ChatController.