GCM Registration Token 是否等于 GCM Registration ID?
Is a GCM Registration Token equal to the GCM Registration ID ?
我今天被 gcm 弄糊涂了。我不知道我的 registrationid 是否正确。我在以 APA 开头的 registrationid 前面有字符和冒号。模式是 xXXXxxX:APA...。我使用此处的示例为 android 客户端实现了 google 云消息传递:https://developers.google.com/cloud-messaging/android/client。如果我使用较旧的实现(例如使用 GCMRegistrar),我只会获得以 APA 开头的注册 ID。到目前为止,我虽然注册 ID 必须以 APA 开头。
冒号前的内容是一些令牌特定的内容吗?我是否必须将完整的令牌传递给网络服务,或者如果我在冒号之前删除字符并发送以 APA 开头的注册是否可以?
gcm.register() 已弃用。使用带有令牌的 instance id 方法。
https://developers.google.com/cloud-messaging/android/legacy-regid
GCM register() is deprecated starting May 28, 2015. New app
development should use the Instance ID API to handle the creation,
rotation, and updating of registration tokens. For more information,
see Registering Client Apps and Set up a GCM Client App on Android.
GCM 注册令牌等于 registration_id。正如我在回答中提到的 :
一个 FCM 代币,或者像 google-cloud-messaging 中通常称为 registrationToken
的代币。如 GCM 文档中所述:
An ID issued by the GCM connection servers to the client app that allows it to receive messages. Note that registration tokens must be kept secret.
不同的术语指向同一件事。注册令牌的格式也可能有所不同 answer:
The GCM registration token is usually around 140 chars in length, and can contain colons, underscores and hyphens. Maximum size is supposed to be 4k.
虽然我不完全确定字符长度,但我想我已经在 post here 某处读到它可能超过该数字。到处搜索。
我今天被 gcm 弄糊涂了。我不知道我的 registrationid 是否正确。我在以 APA 开头的 registrationid 前面有字符和冒号。模式是 xXXXxxX:APA...。我使用此处的示例为 android 客户端实现了 google 云消息传递:https://developers.google.com/cloud-messaging/android/client。如果我使用较旧的实现(例如使用 GCMRegistrar),我只会获得以 APA 开头的注册 ID。到目前为止,我虽然注册 ID 必须以 APA 开头。
冒号前的内容是一些令牌特定的内容吗?我是否必须将完整的令牌传递给网络服务,或者如果我在冒号之前删除字符并发送以 APA 开头的注册是否可以?
gcm.register() 已弃用。使用带有令牌的 instance id 方法。
https://developers.google.com/cloud-messaging/android/legacy-regid
GCM register() is deprecated starting May 28, 2015. New app development should use the Instance ID API to handle the creation, rotation, and updating of registration tokens. For more information, see Registering Client Apps and Set up a GCM Client App on Android.
GCM 注册令牌等于 registration_id。正如我在回答中提到的
一个 FCM 代币,或者像 registrationToken
的代币。如 GCM 文档中所述:
An ID issued by the GCM connection servers to the client app that allows it to receive messages. Note that registration tokens must be kept secret.
不同的术语指向同一件事。注册令牌的格式也可能有所不同 answer:
The GCM registration token is usually around 140 chars in length, and can contain colons, underscores and hyphens. Maximum size is supposed to be 4k.
虽然我不完全确定字符长度,但我想我已经在 post here 某处读到它可能超过该数字。到处搜索。