我有一个使用 FCM 服务的 Android 应用程序。我可以从 Firebase 控制台和 Postman(如此处所述)向设备发送通知并获取它们。但是当我从 Postman 发布通知时,Firebase 控制台根本不会显示。是什么导致了这个问题?我该如何解决这个问题?
注意:
弗兰克·范·普菲伦说:
自 2018 年底以来,Firebase 现在还报告通过调用 Firebase Cloud Messaging API 发送的消息。
编辑:
我通过 Postman 将这个 raw/JSON 作为正文发送:
{
"to": "/topics/Java",
"collapse_key" : "type_a",
"notification" : {
"body" : "Body of Your Notification",
"title": "Title of Your Notification"
},
"data" : {
"body" : "Hello! Body of Your Notification in data",
"title": "Title of Your Notification in data",
"key_1" : "Value for key_1",
"key_2" : "Value for key_2"
}
}