I am trying to implemenent some kind of logging for incoming message from FCM. We are using FCM display(notification) messages type. I am trying to find way to log incomming notification when application is in background. I am aware of that if I would be using FCM Data message type I can simple receive notificaiton in onMessageReceived
callback from FirebaseMessagingService
but unfortunately that's not possible.
it works in background if the fcm payload formed with data message. the notification message will just show message in system tray [app has no access of that message].