handleNotification

open suspend override fun handleNotification(eventType: String?)

Function to pass a received the notification data payload instance to the SDK in order to adjust the SDK state accordingly. This function should be called from FirebaseMessagingService.onMessageReceived(remoteMessage: RemoteMessage)

Example usage:

val eventType = message.data["type"]
try {
sdk.handleNotification(eventType = eventType)
} catch (e: WhitelabelPayError.WrongNotificationType) {
Timber.e(e)
}

Parameters

eventType

the string value of the type data payload key

Throws