有没有办法通过FCM发送免费的无限推送通知?

时间:2017-01-16 05:26:14

标签: cordova push-notification google-cloud-messaging firebase-cloud-messaging pushbots

目前我正在使用Pushbots向所有Android用户发送通知。但是,要发送无限量的消息,我必须支付500美元/月。

我的应用是在Cordova中构建的。如果有其他方法可以这样做,请告诉我。

提前致谢!

1 个答案:

答案 0 :(得分:0)

使用Firebase Cloud Messaging(FCM),以前称为Google Cloud Messaging(GCM)的版本是完全免费的。见Firebase Pricing

  

包括免费

     

分析,应用索引,身份验证,云消息传递,崩溃报告,动态链接,邀请,通知和&远程配置

快速Google搜索显示可用FCM Cordova Plugin。然后你应该继续使用Topic Messaging。从插件链接:

  

订阅主题

//FCMPlugin.subscribeToTopic( topic, successCallback(msg), errorCallback(err) );
//All devices are subscribed automatically to 'all' and 'ios' or 'android' topic respectively.
//Must match the following regular expression: "[a-zA-Z0-9-_.~%]{1,900}".
FCMPlugin.subscribeToTopic('topicExample');

这个想法非常简单。只需所有您的用户订阅某个主题,然后向该主题发送消息,并将其发送给所有用户。