android - How do I trigger onMessageReceived() for killed apps? -
i implemented firebase cloud messaging in android app , setup firebase console. working far for
- app in foreground
- app in background
but not when app killed. according this answer point 1.2:
data messages: theses messages trigger onmessagereceived() callback if app in foreground/background/killed
what missing receive data killed apps?
here json pass:
{ "to": "/topics/testtopic", "data": { "key1" : "val1", "key2" : true } }
i applied example in link above in point 2.
authorization key server key in attached image
{
“data”: { “score”: “45×1”,
“time”: “15:10”
},
“to” : “your server key” }`
about above json format need pass app server:
“data” contain key value pair coming server. “to” fcm token, authorization fcm console -> setting – >project setting -> cloud messaging , there copy server key.
Comments
Post a Comment