title: GCM clarifications
body: <p>I know these methods are deprecated, but since the new GCM API seems to be buggy, I am reverting to these methods until a stable version is pushed by Google.</p>
  
  <p>We are declaring this receiver inside the 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;!-- Receives the actual messages. --&gt;
              &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt;
              &lt;!-- Receives the registration id. --&gt;
              &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION" /&gt;
              &lt;category android:name="com.myApp" /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  
    &lt;service android:name=".GCMIntentService" /&gt;
  </code></pre>
  
  <p>And we have the onMessage() method inside the GCMIntentService class.</p>
  
  <pre><code>   @Override
  protected void onMessage(Context context, Intent intent) 
  {
      Log.i(TAG, "Received message");
      String message = intent.getExtras().getString("msg");
  }
  </code></pre>
  
  <h3>
  
   1. However, upon receiving a message this method is never called.  Why
      ?
  
  </h3>
  
  <p>Moreover, the example I follow uses the following.</p>
  
  <pre><code>registerReceiver(mHandleMessageReceiver, new IntentFilter("intent_filter_string"));
  </code></pre>
  
  <p>associated with the following class.</p>
  
  <pre><code>private final BroadcastReceiver mHandleMessageReceiver = new BroadcastReceiver() 
     {
      @Override
      public void onReceive(Context context, Intent intent) 
     {
          String newMessage = intent.getExtras().getString("data");
      }
   };
  </code></pre>
  
  <p>which gets unregistered inside the onPause.</p>
  
  <ol>
  <li><strong>Why do we need to create this Broadcast Receiver?</strong></li>
  <li><strong>Can't we do this in the manifest ?</strong></li>
  <li><strong>Isn't this already covered by the onMessage() inside the GCMIntentService class ?</strong></li>
  <li><strong>What role does the Pending Intent String play ?</strong></li>
  </ol>
  
  <p>Answers are appreciated.</p>