안녕하세요^^


이번에 GCM으로 바껴서 그거 고수님들의 주옥같은 강좌를 보면서


하고 있는데요.


첨부터 너무 막히네여 ㅠㅠ


우선 서버쪽은 구현 안했구요.


클라이언트에서 등록을 날리면 reg키가 와야되는거 아닌가요?


그런데 반응을 안합니다. ㅠㅠ


아래에 두가지 질문을 적어놓습니다. 조언부탁드려여


1.  source not foud. 

문서에는


GCMRegistrar.checkDevice(this);

GCMRegistrar.checkManifest(this);


하고나서

final String regId = GCMRegistrar.getRegistrationId(this);

 if (regId.equals("")) {

          GCMRegistrar.register(this, PROJECT_ID);

        } else {

          Log.v(TAG, "Already registered");

        }


이걸 하라고 되어있는데


GCMRegistrar.checkDevice(this);

이걸 하면 디버그에서 이라인 넘어갈때 source not foud. 라고 나옵니다. 왜그럴까요?ㅠㅠ


2. 위에 두라인을 지우고

하면 아래 코드가 잘작동되구요


public class GCMBroadCastReceiver extends BroadcastReceiver {


@Override

public void onReceive(Context context, Intent intent) {

// TODO Auto-generated method stub

        MyIntentService.runIntentInService(context, intent);

        setResult(Activity.RESULT_OK, null, null);

}


}

이렇게 만든 리시버에 와야될것같은데

아무 반응이 업습니다. ㅠㅠ

혹시나 해서 xml도 붙여보겠습니다.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.gcm"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />

<permission android:name="com.example.gcm.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.example.gcm.permission.C2D_MESSAGE" /> 
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        
        <!-- receive message -->
<receiver android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
  <intent-filter>
    <action android:name="com.google.android.c2dm.intent.RECEIVE" />
    <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
    <category android:name="com.example.gcm" />
  </intent-filter>
</receiver>
<!-- receive message -->
<service android:name=".GCMIntentService" />
    </application>
</manifest>

제가 잘못한게 있다면 어떤건지 조언해주시면 많은 도움이 될것같습니다. ㅠ