FCM notifications not triggering onNotification method while app in background

I am using @ionic-native/fcm. I can get notifications on the notification tray but the onNotification method is not called while receiving the notification. It is only called when the notification is tapped on the notification tray. below is the code I’ am using:

this.fcm.onNotification().subscribe(data => {

} else {


My payload for notification is as follows:
“title”:“My notification”,
“body”:“My notification body”,

Hello @dikwata,

Any solution on this. I am getting the same issue