uploadDeviceFCMToken

fun uploadDeviceFCMToken(context: Context, token: String, forceUpdate: Boolean = true)

To enable push messages from the StreamLayer service, you need to upload the device token to register it with the current user. Upload the token every time when the token changes. This function should be in your FirebaseMessageService.onNewToken callback.

Parameters

context

Application context

token

device token received from the FCM allowing the StreamLayer service to send push notifications

forceUpdate

if device token same as previous.