handle Notification
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["yp-type"]
val eventData = message.data["yp-event"]
try {
sdk.handleNotification(eventType = eventType, eventBody = eventData)
} catch (e: WhitelabelPayError.WrongNotificationType) {
Timber.e(e)
} catch (e: WhitelabelPayError.InvalidNotificationBody) {
Timber.e(e)
}
Content copied to clipboard
Parameters
event Type
the string value of the yp-type
data payload key
event Body
the string value of the yp-event
data payload key