Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>What i'm writing here i originally got from many pages but the best one that did it for me is <a href="http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html#example_server" rel="nofollow">http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html#example_server</a> at start i watched the Google I/O 2010 c2dm intro and then i watched this nice lecture <a href="http://marakana.com/forums/android/general/272.html" rel="nofollow">http://marakana.com/forums/android/general/272.html</a> but at last that link up there had all i need to make my application work.</p> <p><strong>The answer:</strong> in the manifest where you specified your receiver like this (this is an element inside the application tag):</p> <pre><code> &lt;receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND"&gt; &lt;!-- Receive the actual message --&gt; &lt;intent-filter&gt; &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt; &lt;category android:name="de.vogella.android.c2dm" /&gt; &lt;/intent-filter&gt; &lt;!-- Receive the registration id --&gt; &lt;intent-filter&gt; &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION" /&gt; &lt;category android:name="de.vogella.android.c2dm" /&gt; &lt;/intent-filter&gt; &lt;/receiver&gt; </code></pre> <p>Notice the category tag, I think you didn't assign a category with your Package name either that or one of this permission is missing from (this is an element inside the manifest root tag):</p> <pre><code>&lt;permission android:name="de.vogella.android.c2dm.permission.C2D_MESSAGE" android:protectionLevel="signature" /&gt; </code></pre> <p>as you already guessed the category specifies that only an apllication with that package or sub packages can read the c2dm messages while the android:protectionLevel="signature" specifies that your c2dm messages are protected by a signature (which is the package).</p> <p>Have a nice day i hope i helped</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload