有没有办法通过 FCM 发送免费的无限制推送通知?
Is there a way to send free unlimited push notifications via FCM?
目前我正在使用 Pushbots 向我的所有 Android 订阅者发送通知。但是,要发送无限制的消息,我必须支付 500 USD/month.
我的应用程序是用 Cordova 构建的。请让我知道是否有另一种方法可以做到这一点。
提前致谢!
使用Firebase Cloud Messaging (FCM), previous version known as Google Cloud Messaging (GCM), is completely free of charge. See Firebase Pricing:
Included Free
Analytics, App Indexing, Authentication, Cloud Messaging, Crash Reporting, Dynamic Links, Invites, Notifications & Remote Config
快速 Google 搜索显示有可用的 FCM Cordova Plugin. Then you should go ahead and make use of Topic Messaging。来自插件 link:
Subscribe to topic
//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');
这个想法很简单。只需让 所有 您的用户订阅一个主题,然后向该主题发送一条消息,该消息应该会发送给所有用户。
目前我正在使用 Pushbots 向我的所有 Android 订阅者发送通知。但是,要发送无限制的消息,我必须支付 500 USD/month.
我的应用程序是用 Cordova 构建的。请让我知道是否有另一种方法可以做到这一点。
提前致谢!
使用Firebase Cloud Messaging (FCM), previous version known as Google Cloud Messaging (GCM), is completely free of charge. See Firebase Pricing:
Included Free
Analytics, App Indexing, Authentication, Cloud Messaging, Crash Reporting, Dynamic Links, Invites, Notifications & Remote Config
快速 Google 搜索显示有可用的 FCM Cordova Plugin. Then you should go ahead and make use of Topic Messaging。来自插件 link:
Subscribe to topic
//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');
这个想法很简单。只需让 所有 您的用户订阅一个主题,然后向该主题发送一条消息,该消息应该会发送给所有用户。