-3

Unable to receive data payload message on onMessageReceived when phone is locked. I am using firebase admin nodejs SDK to send data message.Please help!!.

noogui
  • 16,300
  • 4
  • 25
  • 51
Jeccy
  • 29
  • 1
  • 5
  • https://stackoverflow.com/a/37845174/6143482 – noogui Sep 04 '18 at 07:59
  • I tried with following data message json var message={ "topic":topic, "data" : { "volume" : "3.21.15", "contents" : "content for test" }, "android":{ "priority":"high" } } It works fine when phone screen awake ,once phone screen locked message does not comes in onMessageReceived event. – Jeccy Sep 04 '18 at 16:02

1 Answers1

0

we should have a payload like:

{
    ...,
    "data": {
      "key1":"value1",
      "key2":"value2",
      ...
    } 
} 

to receive a onMessageReceived event when app locked

Hovanes Mosoyan
  • 752
  • 7
  • 10