title: GCM Intent service OnRegistered is not getting called
body: <p>I have created a GCM Intent service and the device is getting registered successfully. I also receive the REGISTRATION Intent, but the OnMessage or OnRegistered methods are not getting called.</p>
  
  <p>Below the log i see.</p>
  
  <pre><code>07-23 06:24:23.542: V/GCMBroadcastReceiver(1168): onReceive: com.google.android.c2dm.intent.REGISTRATION
  07-23 06:24:23.542: V/GCMBroadcastReceiver(1168): GCM IntentService class: com.app.demo.myApp.GCMIntentService
  07-23 06:24:23.581: V/GCMBaseIntentService(1168): Acquiring wakelock
  </code></pre>
  
  <p>Below is the code for OnMessage.</p>
  
  <p>Could someone pls help me as to why the OnRegistered or OnMessage is not getting called.</p>
  
  <pre><code> public class GCMIntentService extends GCMBaseIntentService {
  
  
  
      @Override
      protected void onMessage(Context arg0, Intent arg1) {
          // TODO Auto-generated method stub
          Toast.makeText(getApplicationContext(), "registered", Toast.LENGTH_LONG).show();
          String device_id = GCMRegistrar.getRegistrationId(this);
          GSLogger.Log("mess_received", device_id);
      }
  
      @Override
      protected void onRegistered(Context context, String arg1) {
          Toast.makeText(context, "registered", Toast.LENGTH_LONG).show();
          String device_id = GCMRegistrar.getRegistrationId(this);
          GSLogger.Log("registered", device_id);
  
      }
  
  }
  </code></pre>
  
  <p>Manifest Code: </p>
  
  <pre><code>&lt;uses-sdk android:minSdkVersion="7" android:targetSdkVersion="8" /&gt;
  
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.READ_CALENDAR" /&gt;
      &lt;uses-configuration android:name="android.permission.GET_ACCOUNTS"/&gt;
      &lt;uses-permission android:name="com.google.android.c2dm.permission.C2D_MESSAGE"/&gt;
  
  
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
      &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
      &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
       &lt;permission android:name="com.app.demo.myApp.permission.C2D_MESSAGE" 
          android:protectionLevel="signature" /&gt;
      &lt;uses-permission android:name="com.app.demo.myApp.permission.C2D_MESSAGE" /&gt;
  </code></pre>
  
  <p>Receiver Code in Manifest:</p>
  
  <pre><code>&lt;receiver
              android:name="com.google.android.gcm.GCMBroadcastReceiver"
              android:permission="com.google.android.c2dm.permission.SEND" &gt;
               &lt;intent-filter&gt;
                &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt;
                &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION" /&gt;
                &lt;category android:name="com.app.demo.myApp" /&gt;
            &lt;/intent-filter&gt;
          &lt;/receiver&gt;
          &lt;service android:name="com.app.demo.myApp.GCMIntentService" /&gt;
  </code></pre>
  
  <p>Pic of My Package:
  <img src="https://i.stack.imgur.com/QIiQX.png" alt="enter image description here"></p>