onMessageReceived
Call when a push message is received.
Flybuy can leverage Google's Firebase Cloud Messaging (FCM) to get updates about the status of an order. Flybuy does not perform the push notification directly. Instead, it relies on the app to notify it that a new notification has been received. If you do not already handle FCM in your app, refer to the documentation at Firebase for details on how to integrate it in your app.
To pass the message to Flybuy, override the FirebaseMessagingService.onMessageReceived method as follows.
override fun onMessageReceived(remoteMessage: RemoteMessage) {
FlyBuyCore.onMessageReceived(remoteMessage.data) { sdkError ->
// Handle error
}
}Content copied to clipboard
You do not need to filter or check the data of the remoteMessage data, Flybuy will inspect it and only process the notification if it is relevant to the SDK.