I am sending messages to my app from the Console and I managed to have the app react as I want, when it is in background. So basically there is a notification shown by the SDK and when the user taps it and the app starts, I have some custom data fields to use to build a dialog message.
Since I also want the app to react when on foreground I've added the service and I've noticed that the RemoteMessage
also contains a getNotification()
method which returns RemoteMessage.Notification
which I suppose is used by the SDK to show the notification when app in background.
Is there an easy way to simply use that retrieved notification and display it, just as when the app is in background?