com.bear.common.sdk / BearSdk / registerFirebaseToken

registerFirebaseToken

fun registerFirebaseToken(token: String): Unit

Provide the firebase notification token to SDK to register it in Bear backend. This method must be called to enable push notifications.

Parameters

token - the firebase notification token.

fun registerFirebaseToken(token: String, onSuccessAction: (Int) -> Unit): Unit

Provide the firebase notification token to SDK to register it in Bear backend. This method must be called to enable push notifications.

Parameters

token - the firebase notification token. As response to successful registration we get id of the current device registered at Bear backend which we use at onSuccessAction

onSuccessAction - action to execute when registration completed successfully. Int @param for this action is id of the current device registered at Bear backend.