我可以在我的应用程序中同时使用 GCM 和 FCM 吗?
Can I use both GCM and FCM in my app?
我有一个实施了 GCM 的 android 项目。后端(服务器)已经使用 GCM 进行了适当的编码。
现在可以在我的项目中添加 firebase (FCM) 并与 GCM 并行工作吗?我无法迁移到 FCM,因为无法更改我的后端代码,因为它是一个大项目并且代码太多。有人做过这样的事吗?
请帮忙。提前致谢。
根据 FAQ,当您将客户端应用程序从 GCM 迁移到 FCM 时,您不需要额外的服务器配置,因此只需在 android 应用程序中使用 FCM。
Here's 有关如何迁移您的应用程序的文档
不可以,您不能同时使用 FCM 和 GCM。 GCM是旧版本,强烈推荐使用FCM。
Why is Google Cloud Messaging (GCM) part of Firebase? How does it relate to Firebase Cloud Messaging (FCM)?
Google is investing in Firebase, making it our unified mobile
platform.
Over the last few years, we have expanded GCM to send messages to
multiple platforms beyond Android: iOS and Chrome. Firebase is known
for being cross platform, so FCM now makes a natural fit in the
Firebase suite of features designed for Android, iOS, and mobile web.
Another core value of Firebase is cross-feature integration. We are
adding the ability for other Firebase features to easily send messages
via FCM. For example, you can use Firebase Notifications to send
reengagement messages to your users.
We think that GCM will be even more useful to developers as an
integrated part of Firebase. You can still get the same great product,
now under a new name: "Firebase Cloud Messaging," or FCM for short.
Is GCM going to be deprecated?
We will continue to support the current version of GCM Android and iOS
SDKs because we know a lot of developers are using GCM SDKs today to
handle notifications, and client app upgrade takes time.
But all new client-side features will be added to FCM SDKs only moving
forward. You are strongly encouraged to upgrade to FCM SDKs.
您可以获得更多详细信息here
虽然我的具体情况可能有点具体,因为我参与的项目有一个非常具体的后端,在我看来 FCM 与 GCM 的互操作性很好,即你可以在你的应用程序中同时拥有 GCM 和 FCM广播接收器/接收器服务,它们都可以正常工作而不会发生冲突。
这有一个巨大的优势,因为您不必立即决定迁移,您可以逐步进行。
做得好,Google!
我发现同时使用 GCM 和 FCM 有问题。您将获得不同的 deviceToken
,并且其中一个令牌出现 NotRegistered
错误。
对于我的 FCM 令牌,总是出现 NotRegistered
错误,但该应用程序处于活动状态并且未 卸载 并且我的 GCM 令牌有效并收到推送通知。
我有一个实施了 GCM 的 android 项目。后端(服务器)已经使用 GCM 进行了适当的编码。
现在可以在我的项目中添加 firebase (FCM) 并与 GCM 并行工作吗?我无法迁移到 FCM,因为无法更改我的后端代码,因为它是一个大项目并且代码太多。有人做过这样的事吗?
请帮忙。提前致谢。
根据 FAQ,当您将客户端应用程序从 GCM 迁移到 FCM 时,您不需要额外的服务器配置,因此只需在 android 应用程序中使用 FCM。
Here's 有关如何迁移您的应用程序的文档
不可以,您不能同时使用 FCM 和 GCM。 GCM是旧版本,强烈推荐使用FCM。
Why is Google Cloud Messaging (GCM) part of Firebase? How does it relate to Firebase Cloud Messaging (FCM)?
Google is investing in Firebase, making it our unified mobile platform.
Over the last few years, we have expanded GCM to send messages to multiple platforms beyond Android: iOS and Chrome. Firebase is known for being cross platform, so FCM now makes a natural fit in the Firebase suite of features designed for Android, iOS, and mobile web.
Another core value of Firebase is cross-feature integration. We are adding the ability for other Firebase features to easily send messages via FCM. For example, you can use Firebase Notifications to send reengagement messages to your users.
We think that GCM will be even more useful to developers as an integrated part of Firebase. You can still get the same great product, now under a new name: "Firebase Cloud Messaging," or FCM for short.
Is GCM going to be deprecated?
We will continue to support the current version of GCM Android and iOS SDKs because we know a lot of developers are using GCM SDKs today to handle notifications, and client app upgrade takes time.
But all new client-side features will be added to FCM SDKs only moving forward. You are strongly encouraged to upgrade to FCM SDKs.
您可以获得更多详细信息here
虽然我的具体情况可能有点具体,因为我参与的项目有一个非常具体的后端,在我看来 FCM 与 GCM 的互操作性很好,即你可以在你的应用程序中同时拥有 GCM 和 FCM广播接收器/接收器服务,它们都可以正常工作而不会发生冲突。
这有一个巨大的优势,因为您不必立即决定迁移,您可以逐步进行。
做得好,Google!
我发现同时使用 GCM 和 FCM 有问题。您将获得不同的 deviceToken
,并且其中一个令牌出现 NotRegistered
错误。
对于我的 FCM 令牌,总是出现 NotRegistered
错误,但该应用程序处于活动状态并且未 卸载 并且我的 GCM 令牌有效并收到推送通知。