【发布时间】:2018-02-08 16:29:00
【问题描述】:
我正在尝试使用 firebase api 发送通知,如果通知 JSON 对象中只有“标题”和“正文”,则通知发送成功。但是,如果我将“声音”:“默认”添加到通知对象,如documentation 中所述,我会收到以下错误:
“收到无效的 JSON 有效负载。'message.notification' 中的未知名称 \"sound\": 找不到字段。”
我的 JSON 对象如下:
{"message":{"token": token, "notification":{"title":"Test", "body":"Test message from server", "sound":"default"}}}
【问题讨论】:
标签: firebase firebase-cloud-messaging