GCM android client not working
<p>I'm trying to use GCM to receive messages from our server when the user is not in the app.</p>

<p>The porblem is that the <code>GcmListenerService</code> doesn't seem to work whilst the registeration works just fine. Our server should be working just fine since we receive confirmation from the GCM server every time we send something from our server to GCM.</p>

<p>This is my manifest (only GCM section)</p>

<pre class="lang-xml prettyprint-override"><code>&lt;receiver
    android:name="com.google.android.gms.gcm.GcmReceiver"
    android:exported="false"
    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;category android:name="my.package.package"/&gt;
    &lt;/intent-filter&gt;

    &lt;intent-filter&gt;
        &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION"/&gt;
        &lt;category android:name="my.package.package"/&gt;
    &lt;/intent-filter&gt;
&lt;/receiver&gt;

&lt;service
    android:name=".services.MyGcmListenerService"
    android:exported="false"&gt;
    &lt;intent-filter&gt;
        &lt;action android:name="com.google.android.c2dm.intent.RECEIVE"/&gt;
    &lt;/intent-filter&gt;
&lt;/service&gt;

&lt;service
    android:name=".services.MyGcmRegisterationService"
    android:exported="false"&gt;
    &lt;intent-filter&gt;
        &lt;action android:name="com.google.android.gms.iid.InstanceID"/&gt;
    &lt;/intent-filter&gt;
&lt;/service&gt;
</code></pre>

<p>and this is the simplified <code>onMessageReceived</code></p>

<pre><code>@Override
public void onMessageReceived(String from, Bundle data)
{
    saveDataToDatabase(data);
    dataReceivedNotification();
}
</code></pre>