I am trying to read data payloads when the android app is in kill state or background state. I have googled multiple place but nothing worked. I am able to receive and read the data payloads in foreground using this :
remoteMessage.getData().get("message")
But I want to use this data when the application in the foreground onMessageReceived function. After multiple search I think that onMessageReceived is not been hit while the app in background. But is there anyway to solve this problem.
Thanks in advance!!