Receive and handle topic messages - shaikhalvee/FCM GitHub Wiki
👇
_________________________________________________________________________________________
App state Notification Data Both
_________________________________________________________________________________________
Foreground onMessageReceived onMessageReceived onMessageReceived
_________________________________________________________________________________________
Background System tray onMessageReceived Notification: system tray
Data: in extras of the intent.
_________________________________________________________________________________________
So, if you have data payload, onMessageReceived will be always called.