Android GCM 项目 ID,哪个?

标签 android google-cloud-messaging

休息后我又开始查看 Android GCM 服务,并对“入门”指南中描述的项目 ID 感到困惑:

Click Create project. Your browser URL will change to something like:

https://code.google.com/apis/console/#project:4815162342

Take note of the value after #project: (4815162342 in this example). This is your project ID, and it will be used later on as the GCM sender ID.

我们称它为ID_1

我忘记了我的项目 ID 可以在浏览器的 Console API 链接上看到,所以认为我没有项目 ID,我通过 Google API 控制台注册了项目并点击“注册”关联。我必须选择一个 ID,所以现在当我查看项目的控制台仪表板时,我会看到以下形式的内容:

仪表板

Project Summary Name    MYGCMProject
Project ID              i-picked-this-id-2-11b-36
Owners                  me@myemail - you

我们将“i-picked-this”值称为ID_2

所以我的问题是我在客户端的 registerClient 代码中使用哪个值(ID_1 或 ID_2)

GCMRegistrar.register(this, PROJECT_ID); 

?

如果还是ID_1,我在API控制台注册项目时选择的ID有什么用?

(我看过这个问题 Android GCM- Register Id and Project Id,这是最接近的一个问题,它对我的​​查询没有任何意义)

最佳答案

4815 1623 42 this one and it should be **twelve digit**

从 URL = https://code.google.com/apis/console/#project:4815162342 中找到它<---

关于Android GCM 项目 ID,哪个?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12781003/

相关文章:

java - Android 未检测到设备何时旋转

android - GoogleCloudMessaging Android 客户端 : IntentService truly necessary?

c# - 如何刷新 GCM 中过期一段时间的注册 token ?

java - 分页编译问题: Not sure how to convert a Cursor to this method's return type

Android 1.5 和 1.6 调用完成 Activity 和主页按钮奇怪的行为

android - 使用 GCM 修改 android 通知格式

android - 我可以在现有的 GCM 服务器上注册一个新的应用程序吗?

Android 无法从包中获取 bool 值

android - 如何实时改变视频流?

android - Android 库中的 Proguard