【发布时间】:2018-11-13 06:56:14
【问题描述】:
我想在我的应用程序 (Ionic) 中使用带有 Firebase Cloud Messaging 的推送通知,而无需使用 firebase 控制台。我需要直接从我的应用程序发送通知。
有可能吗?
谢谢!
【问题讨论】:
标签: angular firebase ionic-framework push-notification firebase-cloud-messaging
我想在我的应用程序 (Ionic) 中使用带有 Firebase Cloud Messaging 的推送通知,而无需使用 firebase 控制台。我需要直接从我的应用程序发送通知。
有可能吗?
谢谢!
【问题讨论】:
标签: angular firebase ionic-framework push-notification firebase-cloud-messaging
有一个 API 用于向设备、设备组和主题(客户端可以订阅)发送消息。例如,请参阅 Firebase 文档中的页面sending your first message。
请注意,向应用发送消息需要您指定 FCM 服务器密钥。顾名思义,此密钥只能在您控制的服务器或其他受信任的环境中使用。这就是文档中的示例是 CURL 调用的原因,您可以轻松地从开发机器或服务器上运行它们。
【讨论】: