Google Cloud Messaging(GCM) for Android, android平台消息推送技术(一):建立Google API 项目
2012-10-10 12:16
986 查看
最近由于工作关系,需要对android手机平台客户进行消息推送,而android手机平台原来的推送技术用的是c2dm(Cloud to Device Messaging Framework),但c2dm今年google已经宣布停止支援跟开发,也不再接受新用户注册,之后google正式推出了GCM(Google Cloud Messaging)来代替c2dm。下面我们来根据google的提供的例子来实现消息推送。
首先,我们需要通过google的账号建立Google API Project。具体可以浏览google的网页:http://developer.android.com/guide/google/gcm/gs.html。神马,你没有google账号?那赶紧去注册一个google邮箱!-_-。
建立之后,进去你的Google API Console页面,URL会变成这样https://code.google.com/apis/console/#project:4815162342,4815162342就是你的project ID,请记住,我们以后的GCM都需要通过这个ID来推送。
然后,在这个页面,找到服务(service),将Google Cloud Messaging for Android这个服务的状态变为打开
进入API Access页面,新建server key和browser key,你可以在建立页面加入限制ip访问, 然后得到server apps的API key。这样,前期工作基本就完成了。
首先,我们需要通过google的账号建立Google API Project。具体可以浏览google的网页:http://developer.android.com/guide/google/gcm/gs.html。神马,你没有google账号?那赶紧去注册一个google邮箱!-_-。
建立之后,进去你的Google API Console页面,URL会变成这样https://code.google.com/apis/console/#project:4815162342,4815162342就是你的project ID,请记住,我们以后的GCM都需要通过这个ID来推送。
然后,在这个页面,找到服务(service),将Google Cloud Messaging for Android这个服务的状态变为打开
进入API Access页面,新建server key和browser key,你可以在建立页面加入限制ip访问, 然后得到server apps的API key。这样,前期工作基本就完成了。
相关文章推荐
- Google Cloud Messaging(GCM) for Android, android平台消息推送技术(二):GCM推送
- 使用Google Cloud Messaging (GCM)服务实现Android消息推送
- 使用GCM服务(Google Cloud Messaging)实现Android消息推送
- 使用GCM服务(Google Cloud Messaging)实现Android消息推送
- 使用GCM服务(Google Cloud Messaging)实现Android消息推送
- Google Cloud Messaging (Android 消息推送技术) (二)
- Android 使用GCM(Google Cloud Messaging)推送消息
- 使用GCM服务(Google Cloud Messaging)实现Android消息推送
- 使用GCM服务(Google Cloud Messaging)实现Android消息推送
- Android 使用GCM(Google Cloud Messaging)推送消息
- Google Cloud Messaging(GCM) for Android
- Google Cloud Messaging for Android (GCM)已推出,将取代C2DM框架
- Android Push Notifications using Google Cloud Messaging GCM
- Google Cloud Message for Android(GCM云推送)(译文和开发流程)
- android: Google Cloud Messaging (GCM)
- Google Cloud Message for Android(GCM云推送)(译文和开发流程)
- Android Push Notifications using Google Cloud Messaging (GCM), PHP and MySQL
- Android Push Notifications using Google Cloud Messaging (GCM), PHP and MySQL