title: error setting up push notification using parse.com and android studio
body: <p>following the parse.com tutorial for setting up push notification on android (<a href="https://parse.com/tutorials/android-push-notifications" rel="nofollow">https://parse.com/tutorials/android-push-notifications</a>).  ide is android studio 0.8.9 on mac os maverick.</p>
  
  <p>errors -></p>
  
  <pre><code>Cannot use GCM for push because the app manifest is missing some required declarations
  Also, please make sure that these services and broadcast receivers are declared as children of the &lt;application&gt; element
  </code></pre>
  
  <p>logcat output -></p>
  
  <pre><code>10-13 23:12:10.430    4942-4962/com.pixtas.sup E/com.parse.ManifestInfo﹕ Cannot use GCM for push because the app manifest is missing some required declarations. Please make sure that these permissions are declared as children of the root &lt;manifest&gt; element:
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
      &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
      &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
      &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
      &lt;permission android:name="com.pixtas.sup.permission.C2D_MESSAGE" android:protectionLevel="signature" /&gt;
      &lt;uses-permission android:name="com.pixtas.sup.permission.C2D_MESSAGE" /&gt;
      Also, please make sure that these services and broadcast receivers are declared as children of the &lt;application&gt; element:
      &lt;service android:name="com.parse.PushService" /&gt;
      &lt;receiver android:name="com.parse.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.pixtas.sup" /&gt;
      &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  10-13 23:12:10.470    4942-4963/com.pixtas.sup D/dalvikvm﹕ GC_FOR_ALLOC freed 199K, 3% free 7918K/8156K, paused 34ms, total 34ms
  10-13 23:12:10.600    4942-4942/com.pixtas.sup D/libEGL﹕ loaded /system/lib/egl/libEGL_tegra.so
  10-13 23:12:10.630    4942-4942/com.pixtas.sup D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_tegra.so
  10-13 23:12:10.640    4942-4942/com.pixtas.sup D/libEGL﹕ loaded /system/lib/egl/libGLESv2_tegra.so
  10-13 23:12:10.670    4942-4942/com.pixtas.sup D/OpenGLRenderer﹕ Enabling debug mode 0
  10-13 23:12:11.050    4942-4965/com.pixtas.sup D/dalvikvm﹕ GC_FOR_ALLOC freed 265K, 4% free 8165K/8468K, paused 23ms, total 23ms
  10-13 23:12:11.420    4942-4975/com.pixtas.sup E/com.parse.PushService﹕ Tried to use push, but this app is not configured for push due to: Push is not configured for this app because the app manifest is missing required declarations. Please add the following declarations to your app manifest to support either GCM or PPNS for push (or both). To enable GCM support, please make sure that these permissions are declared as children of the root &lt;manifest&gt; element:
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
      &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
      &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
      &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
      &lt;permission android:name="com.pixtas.sup.permission.C2D_MESSAGE" android:protectionLevel="signature" /&gt;
      &lt;uses-permission android:name="com.pixtas.sup.permission.C2D_MESSAGE" /&gt;
      Also, please make sure that these services and broadcast receivers are declared as children of the &lt;application&gt; element:
      &lt;service android:name="com.parse.PushService" /&gt;
      &lt;receiver android:name="com.parse.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.pixtas.sup" /&gt;
      &lt;/intent-filter&gt;
      &lt;/receiver&gt;
      To enable PPNS support, please make sure that these permissions are declared as children of the root &lt;manifest&gt; element:
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /&gt;
      &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
      &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
      Also, please make sure that these services and broadcast receivers are declared as children of the &lt;application&gt; element:
      &lt;service android:name="com.parse.PushService" /&gt;
      &lt;receiver android:name="com.parse.ParseBroadcastReceiver"&gt;
      &lt;intent-filter&gt;
      &lt;action android:name="android.intent.action.BOOT_COMPLETED" /&gt;
      &lt;action android:name="android.intent.action.USER_PRESENT" /&gt;
      &lt;/intent-filter&gt;
  </code></pre>
  
  <p>AndroidManifest.xml -></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.pixtas.sup" &gt;
  
      // permissions required for parse.com
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
      &lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /&gt;
      &lt;uses-permission android:name="android.permission.VIBRATE" /&gt;
      &lt;uses-permission android:name="android.permission.GET_ACCOUNTS" /&gt;
      &lt;uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /&gt;
  
      &lt;!--
        IMPORTANT: Change "com.parse.tutorials.pushnotifications.permission.C2D_MESSAGE" in the lines below
        to match your app's package name + ".permission.C2D_MESSAGE".
      --&gt;
      &lt;permission android:protectionLevel="signature"
          android:name="com.pixtas.sup.permission.C2D_MESSAGE" /&gt;
      &lt;uses-permission android:name="com.pixtas.sup.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=".Main"
              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;
  
          // register parse.com service and broadcast receivers
          &lt;service android:name="com.parse.PushService" /&gt;
          &lt;receiver android:name="com.parse.ParseBroadcastReceiver"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.BOOT_COMPLETED" /&gt;
                  &lt;action android:name="android.intent.action.USER_PRESENT" /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
          &lt;receiver android:name="com.parse.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;!--
                    IMPORTANT: Change "com.parse.tutorials.pushnotifications" to match your app's package name.
                  --&gt;
                  &lt;category android:name="com.pixtas.sup.pushnotifications" /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
          &lt;receiver android:name="com.parse.ParsePushBroadcastReceiver" android:exported="false"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="com.parse.push.intent.RECEIVE" /&gt;
                  &lt;action android:name="com.parse.push.intent.DELETE" /&gt;
                  &lt;action android:name="com.parse.push.intent.OPEN" /&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
  
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>