我无法获得我的设备令牌,我正在使用 GCMRegistrar 我正在提供我的代码。我怎么了,我不明白。
我的清单文件包括
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<!-- Receives the registration id. -->
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example.apnsautodial" />
</intent-filter>
</receiver>
<service android:name=".GCMIntentService" />
我的活动包括
GCMRegistrar.checkDevice(this);
GCMRegistrar.checkManifest(this);
regId = GCMRegistrar.getRegistrationId(this);
if (regId.equals("")) {
GCMRegistrar.register(this, SENDER_ID);
}
请帮帮我
感谢广告