onMessageReceived method

Future<bool> onMessageReceived(
  1. Map<String, dynamic> message, {
  2. bool handleNotificationTrigger = true,
})

Processes push notification received outside the CIO SDK. The method displays notification on device and tracks CIO metrics for push notification.

message push payload received from FCM. The payload must contain data payload received in push notification. handleNotificationTrigger flag to indicate whether it should display the notification or not. true (default): The SDK will display the notification and track associated metrics. false: The SDK will only process the notification to track metrics but will not display any notification. Returns a Future that resolves to boolean indicating if the notification was handled by the SDK or not.

Implementation

Future<bool> onMessageReceived(Map<String, dynamic> message,
    {bool handleNotificationTrigger = true}) {
  throw UnimplementedError('onMessageReceived() has not been implemented.');
}