android: Google Cloud Messaging (GCM)

36 篇文章 0 订阅
GCM是第二代的google message service, 第一代是c2dm。 目前c2dm已经相当于不能用了,因为它不在允许新的android注册和使用c2dm。


如何创建一个最简单的app和相关的server side. (ref link)

1. 首先要有一个google account,and then access Google APIs Console page (https://code.google.com/apis/console).
2. 在"Dashboard" page里为你的要使用gcm的android app创建一个project: 在该page select左上角的下拉框 "Other projects > Create",然后给一个project name。
3. 创建好project后,就会进入该project的management web page。查看该page的url (类似于: https://code.google.com/apis/console/?pli=1#project:1241100000:overview),其中的"1241100000"将会作为GCM sender ID!!
4. click "Services" tab, Turn “Google Cloud Messaging” toggle to ON
5. click "API Access" tab, click "Create new Server key", click "Create" button. 这就会创建一个Key for server apps。其中的API key等下会用到。

Note: If you need to rotate the key, click Generate new key. A new key will be created while the old one will still be active for up to 24 hours. If you want to get rid of the old key immediately (for example, if you feel it was compromised), click Delete key.


6. 剩下的步骤就是开发client side and server side code,参看http://developer.android.com/guide/google/gcm/gs.html


GCM server side C# version:

http://www.dotblogs.com.tw/shadow/archive/2012/07/05/73236.aspx



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值