title: GCM Broadcast Receiver onReciever is not called
body: <p>I am trying to implement notifications for my android application but I am not getting <code>OnReceive</code> event of MyBroadcastReciever being called.</p>
  
  <p>Here's my Manifest File:</p>
  
  <p>
  </p>
  
  <pre><code>&lt;uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="17" /&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.example.gcm.permission.C2D_MESSAGE" 
      android:protectionLevel="signature" /&gt;
  &lt;uses-permission android:name="com.example.gcm.permission.C2D_MESSAGE" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/ic_launcher"
      android:label="@string/app_name"
      android:theme="@style/AppTheme" &gt;
      &lt;activity
          android:name="com.example.gcmtester.MainActivity"
          android:label="@string/app_name" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  
      &lt;receiver
          android:name="com.example.gcm.MyBroadcastReceiver"
          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.example.gcm" /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
      &lt;service android:name="com.example.gcm.MyIntentService" /&gt;
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Here's how I am trying to call the service.</p>
  
  <pre><code>    Intent registrationIntent = new Intent("com.google.android.c2dm.intent.REGISTER");
      registrationIntent.putExtra("app", PendingIntent.getBroadcast(this, 0, new Intent(), 0));
      registrationIntent.putExtra("sender", "MY_SENDER_ID");
      startService(registrationIntent);
  </code></pre>
  
  <p>The <code>MyIntentService</code> code is also similar to the one mentioned <a href="http://developer.android.com/google/gcm/gcm.html#handling_intents" rel="nofollow">here</a>.
  But still my <code>BroadcastReciever</code> onRecieve method is not being called. What is the problem am I forgetting something ?</p>
  
  <p><strong>Note:</strong> <code>MyIntentService and BroadcastReciever</code> classes are in a seperate package<code>(com.example.gcm)</code> from the <code>Main Activity</code> package. </p>