Google Developer页面已发布如下消息:
As of April 10, 2018, Google has deprecated GCM. The GCM server and client APIs are deprecated and will be removed as soon as April 11, 2019. Migrate GCM apps to Firebase Cloud Messaging (FCM), which inherits the reliable and scalable GCM infrastructure, plus many new features. See the migration guide to learn more.
并且来自firebase.googleblog.com
:
If you have projects that are still using the GCM APIs, you will need to update your client and server code to use FCM before April 11, 2019. But rest assured, your existing GCM tokens will continue to work with FCM so you won't lose the ability to send messages to your existing users.
我对这些消息感到困惑。这是什么意思吗?
fcm.googleapis.com/fcm/
和fcm-xmpp.googleapis.com
(此时可以更改)还有关于Google推送通知的内部工作的问题:
更新:
com.google.android.gcm
(在https://chromium.googlesource.com/android_tools/+/master/sdk/extras/google/gcm/gcm-client/src/com/google/android/gcm上)的源代码;它不包含任何直接链接到GCM或推送通知服务器的URL。似乎可以通过Google Play服务(How GCM connection Servers sends messages to an Android device?)工作,因此Google Play服务是否根据项目ID(或其他信息)确定FCM或GCM的URL?