本文介绍了是com.google.android.c2dm.intent.REGISTRATION德precated?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

短版:是的原意 com.google.android.c2dm.intent.REGISTRATION 仍然在所有使用或是否已通过GCM pcated完全去$ P $?

Short version: is the intent com.google.android.c2dm.intent.REGISTRATION still used at all or has it been completely deprecated by GCM?

更长的版本:谷歌的 GCM-演示客户端宣布这一意图在它的过滤,但是,如果我按照同样的程序,我得到一个有效的注册ID,当我打电话 gcm.register()然后的,我的广播接收器接收,因为注册过滤器的附加注册ID,而这第二个注册ID是假的(我不能发出任何通知的话)。

Longer version: Google's gcm-demo-client declares this intent in its filter, however, if I follow the same procedure, I get a valid registration id when I call gcm.register() and then, my broadcast receiver receives an additional registration id because of the REGISTRATION filter, and this second registration id is bogus (I can't send any notification to it).

在这一点上,我考虑删除注册过滤器(并保持刚接收),但我想以确保我没有失去了一些东西在协议中重要的。

At this point, I'm considering removing the REGISTRATION filter (and keeping just RECEIVE) but I want to make sure I'm not missing something important in the protocol.

推荐答案

您可能正在看着谷歌官方演示的旧版本。该当前版本不使用 com.google.android.c2dm.intent.REGISTRATION ,你可以在这里看到:

You are probably looking at an older version of the official Google demo.The current version doesn't use com.google.android.c2dm.intent.REGISTRATION, as you can see here:

    <receiver
        android:name=".GcmBroadcastReceiver"
        android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter>
            <!-- Receives the actual messages. -->
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <category android:name="com.google.android.gcm.demo.app" />
        </intent-filter>
    </receiver>

这篇关于是com.google.android.c2dm.intent.REGISTRATION德precated?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 17:06