firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.44k stars 3.91k forks source link

Localised notifications payload #12691

Open alexandrter opened 3 weeks ago

alexandrter commented 3 weeks ago

The documentation states that the message payload for a localised message should look like this:

{
  "data": {
    "title_loc_key": "NOTIFICATION_TITLE",
    "body_loc_key": "NOTIFICATION_MESSAGE"
  }
}

However, as commented by k-marciniak here, the actual payload for android should look something like:

{
  "androidConfig": {
    "notification": {
         "titleLocKey": "NOTIFICATION_TITLE",
         "bodyLocKey": "NOTIFICATION_MESSAGE"
      }
  }
}

It would also help a lot if the documentation could be adjusted for iOS as well since it's very inconvenient to test FCM on iOS and the currently documented approach did not work for me.