title: Google C2D_MESSAGE Application does not define permission?
body: <p>i have problem in my code, I've just followed the google guide for GCM push messaging and am getting this error:</p>
  
  <pre><code>06-07 10:51:04.371: E/AndroidRuntime(29686): FATAL EXCEPTION: main
  06-07 10:51:04.371: E/AndroidRuntime(29686): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.droidersuin.project/com.droidersuin.pushnotifications.PushMainActivity}: java.lang.IllegalStateException: Application does not define permission com.droidersuin.project.permission.C2D_MESSAGE
  06-07 10:51:04.371: E/AndroidRuntime(29686):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1959)
  06-07 10:51:04.371: E/AndroidRuntime(29686):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1984)
  06-07 10:51:04.371: E/AndroidRuntime(29686):    at android.app.ActivityThread.access$600(ActivityThread.java:126)
  06-07 10:51:04.371: E/AndroidRuntime(29686):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1150)
  06-07 10:51:04.371: E/AndroidRuntime(29686):    at android.os.Handler.dispatchMessage(Handler.java:99)
  06-07 10:51:04.371: E/AndroidRuntime(29686):    at android.os.Looper.loop(Looper.java:137)
  06-07 10:51:04.371: E/AndroidRuntime(29686):    at android.app.ActivityThread.main(ActivityThread.java:4456)
  06-07 10:51:04.371: E/AndroidRuntime(29686):    at java.lang.reflect.Method.invokeNative(Native Method)
  06-07 10:51:04.371: E/AndroidRuntime(29686):    at java.lang.reflect.Method.invoke(Method.java:511)
  06-07 10:51:04.371: E/AndroidRuntime(29686):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
  06-07 10:51:04.371: E/AndroidRuntime(29686):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
  06-07 10:51:04.371: E/AndroidRuntime(29686):    at dalvik.system.NativeStart.main(Native Method)
  06-07 10:51:04.371: E/AndroidRuntime(29686): Caused by: java.lang.IllegalStateException: Application does not define permission com.droidersuin.project.permission.C2D_MESSAGE
  06-07 10:51:04.371: E/AndroidRuntime(29686): 
  </code></pre>
  
  <p>and this my manifest</p>
  
  <pre><code> &lt;activity
          android:name="com.droidersuin.pushnotifications.RegisterPushActivity"
          android:screenOrientation="portrait"
          android:theme="@android:style/Theme.Black.NoTitleBar"
          android:label="@string/app_name" &gt;
  
      &lt;/activity&gt;
  
      &lt;activity
         android:name="com.droidersuin.pushnotifications.PushMainActivity"
           android:screenOrientation="portrait"
          android:theme="@android:style/Theme.Black.NoTitleBar"
          android:configChanges="keyboardHidden|orientation" &gt;
      &lt;/activity&gt;
  
      &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.droidersuin.pushnotifications" /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  
      &lt;service android:name="com.droidersuin.pushnotifications.GCMIntentService" /&gt;
  
  
  &lt;/application&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="android.permission.VIBRATE" /&gt;  
  &lt;permission 
      android:name="com.droidersuin.pushnotifications.permission.C2D_MESSAGE" 
      android:protectionLevel="signature"/&gt;
  &lt;uses-permission android:name="com.droidersuin.pushnotifications.permission.C2D_MESSAGE" /&gt; 
  &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
  </code></pre>
  
  <p>this my package :</p>
  
  <p><img src="https://i.stack.imgur.com/YrV6C.png" alt="my package"></p>
  
  <p>any body help me.. ? I hope someone can help with this, always frustrating when you are following a tutorial.</p>