android - How do I trigger onMessageReceived() for killed apps? -


i implemented firebase cloud messaging in android app , setup firebase console. working far for

  1. app in foreground
  2. 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.

enter image description here

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

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -