WebexConnectFirebaseMessagingService

Service to handle Firebase Cloud Messaging (FCM) messages.

Service to handle Firebase Cloud Messaging (FCM) messages.

Syntax: class WebexConnectFirebaseMessagingService : FirebaseMessagingService

Functions

MethodsDescription
onMessageReceivedCalled when a message is received.
onNewTokenCalled when a new token for the default Firebase project is generated.

onMessageReceived

This is also called when a notification message is received while the app is in the foreground.

Syntax: override fun onMessageReceived(message: RemoteMessage)

Parameters

ParametersTypeDescription
messageRemoteMessageRemote message that has been received.

onNewToken

This is invoked after the app is installed when a token is first generated and again if the token changes.

Syntax: override fun onNewToken(token: String)

Parameters

ParametersTypeDescription
tokenStringThe token used for sending messages to this application instance.