0

My case is the following: a user do something, then my Firebase script in Functions should notify his friends, but it don't know what lang set up for the app of certain friend.

If the Android app in foreground, there is no problem, I simply should send some json in notification payload and then parse it in onMessageReceived using current lang values. But I can't do the same, when the app in background or closed. So it sounds like I have to build multi-lang notifications at the backend, am I right? Any suggestions appreciated.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
Konstantin Konopko
  • 5,229
  • 4
  • 36
  • 62

1 Answers1

0

Searching for hours, I had found pretty good answer. You don't have to store lang constants in backend scripts, because you can manage notification's data even if your app in background or even closed. You just should clear notification field of notification payload. See full answer.

Konstantin Konopko
  • 5,229
  • 4
  • 36
  • 62