0

デバイストークンを取得できず、コードを提供している 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);
}

私を助けてください

前もって感謝します

4

2 に答える 2