79700694

Date: 2025-07-14 09:53:44
Score: 2
Natty:
Report link

I am triggering notification using FCM V1 and getting a strange error. This is what my payload looks like:

{
  "message": {
        "android": {
            "notification": {
                "body_loc_args": ["test", "notification"],
                "title_loc_key": "NOTIFICATION_TITLE",
                "body_loc_key": "SUCCESS_MSG"
            }
        },
        "data": {
            "test-id": "1"
        }
    }
}

On foreground and background I receive different payloads on android. Why is it so?

// Background mode

{
    "android": {}, 
    "bodyLocArgs": ["test", "notification"],
    "bodyLocKey": "SUCCESS_MSG", 
    "titleLocKey": "NOTIFICATION_TITLE"
}

// Foreground mode
{ "test-id": "1" }

Why is it so?

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Niaz Babar Bahadur