登记混乱的Andr​​oid GCM混乱、Andr、GCM、oid

2023-09-07 08:36:56 作者:谁与争疯

我想迁移到 GCM 在Android中, C2DM 现在去precated。注册过程描述这里不同于注册描述这里。都注册相同?我们可以看到,$ C $下 GCMRegistrar 来的时候吗?

I am trying to migrate to GCM in Android, C2DM now being deprecated. The registration process described here is different from registration described here. Are both registration same? Can we see code for GCMRegistrar to know for sure?

推荐答案

它们实际上是一回事。第二个封装中的第一个静态方法并注册的广播接收机。您可以将源到gcm.jar,看看自己。你可以找到源头code在〜/ Android的软件开发工具包/演员/谷歌/ GCM / GCM客户端/ GCM-src.jar

They are actually the same thing. The second one encapsulates the first one in a static method and registers a broadcast receiver. You can attach the source to the gcm.jar and see for yourself. You can find source code in ~/android-sdks/extras/google/gcm/gcm-client/gcm-src.jar

 
精彩推荐