【发布时间】:2018-02-23 05:38:41
【问题描述】:
我已经包含了来自 Ionic Native 的 FCM,当我从 FCM Web 界面发送消息时,我可以在后台和前台接收通知。它按预期工作。但是,当我 curl 请求时,它仅在应用程序处于前台时才有效。有谁知道为什么会这样?我没有看到任何东西http protocol docs。
这是我要发送的请求。
curl -H "Content-type: application/json" -H "Authorization:key=<fcm server key>" -X POST -d '{ "data": { "title": "wow", "msg": "hello world"},"to":"<fcm token>"}' https://fcm.googleapis.com/fcm/send
我还尝试从 FCM Web 界面模拟网络流量,看看它是否与有效负载字段有关,但仍然没有运气。
【问题讨论】:
标签: android curl firebase-cloud-messaging ionic3 cordova-plugin-fcm