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!!.
Asked
Active
Viewed 57 times
-3

ReyAnthonyRenacia
- 17,219
- 5
- 37
- 56

Jeccy
- 29
- 1
- 5
-
https://stackoverflow.com/a/37845174/6143482 – ReyAnthonyRenacia 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 Answers
0
we should have a payload like:
{
...,
"data": {
"key1":"value1",
"key2":"value2",
...
}
}
to receive a onMessageReceived event when app locked

Hovanes Mosoyan
- 760
- 7
- 10