handleReceivedMessage static method
- required Map notificationData,
- required dynamic flyCallBack(
- FlyResponse response
This handleReceivedMessage Handles an incoming FCM message received by the Mirrorfly SDK for only Android
for iOS
Need to add Notification Extension Service
add this line in your Notification Extension service MirrorFlyNotification().handleNotification(notificationRequest: request, contentHandler: contentHandler, containerID: "xxx", licenseKey: "xxxx")
This method is responsible for processing the received FCM message and passing it to the Mirrorfly SDK for further handling.
The notificationData
parameter is a required Map containing the remoteMessage.data
received in the FCM message notification RemoteMessage
.
The flyCallBack
parameter is a function that will be called upon completion of the operation.
It receives a FlyResponse object as a parameter, which contains information about the success or failure of the operation.
to Show Notification using FCM 'remoteMessage.data' as notificationData
for iOS Need to add Notification Extension Service
add this line in your extension service MirrorFlyNotification().handleNotification(notificationRequest: request, contentHandler: contentHandler, containerID: "xxx", licenseKey: "xxxx")
Implementation
static Future<void> handleReceivedMessage(
{required Map notificationData,
required Function(FlyResponse response) flyCallBack}) {
return FlyChatFlutterPlatform.instance
.handleReceivedMessage(notificationData, flyCallBack);
}