-
我用POST设置了一个REST客户端 - > https://fcm.googleapis.com/fcm/send
-
Content-Type:application / json
-
授权:key =
<server-key>
-
JSON正文:
{“to”:“testTopic”,“data”:{“key1”:“val1”,“key2”:true}}
200回复,但响应机构有:
{
"multicast_id": 6098503498585,
"success": 0,
"failure": 1,
"canonical_ids": 0,
"results":[
{
"error": "InvalidRegistration"
}
]
}
So the onMessageReceived() is not triggered, neither app in foreground nor in background? Why do I get InvalidRegistration ? What am I missing?
第3点的服务器密钥来自Firebase项目设置 - > Cloud 消息传递 - >服务器密钥
1 回答
在4.你的JSON需要一个前提
为了“到”因此: