我使用Firebase云消息传递向我的Android客户端应用发送通知,每个通知应根据其注册令牌发送到单个设备。Firebase云消息传递 - 响应中的“成功”和“失败”JSON
每次我通过https://fcm.googleapis.com/fcm/send发送通知,我收到这样一个JSON响应:
{
"multicast_id": 108,
"success": 1,
"failure": 0,
"canonical_ids": 0,
"results": [
{ "message_id": "1:08" }
]
}
我发现success
和failure
多余的 - 他们不意味着同样的事情?我应该检查他们两个,确保一切正常吗?总是这样吗?
Thanks!我认为这是一个奇怪的编码布尔值。现在它很清楚。 – vojta
另请参阅https://firebase.google.com/docs/cloud-messaging/send-message#http_response,了解更多罗嗦的解释。 –