0

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!!

Piyush Sahay
  • 51
  • 1
  • 10
  • How do you send push notifications? Can you share the code? – Eugene Babich Dec 19 '18 at 13:45
  • Look here https://stackoverflow.com/questions/37711082/how-to-handle-notification-when-app-in-background-in-firebase/38795553#38795553 P.S. you must send notifications not from firebase console and only with commands. – Eugene Babich Dec 19 '18 at 13:52

0 Answers0