title: PhoneGap Build Push Notification (Android)
body: <p>I am having trouble receiving any type of callback for the <a href="https://github.com/phonegap-build/PushPlugin" rel="noreferrer">push notifications plugin</a> for phonegap build, I have included the plugin inside config.xml.</p>
  
  <p>I have signed up to <a href="http://developer.android.com/google/gcm/index.html" rel="noreferrer">GCM</a> and got my project number needed for pushNotification.register().</p>
  
  <p>I also have access to the window.plugins.pushNotification object so I know it's included the plugin.</p>
  
  <ul>
  <li><strong>PhoneGap Build Version:</strong> 3.1</li>
  <li><strong>Hydration:</strong> Disabled</li>
  <li><strong>Debug:</strong> Enabled</li>
  <li><strong>Device:</strong> Samsung Tab 2</li>
  </ul>
  
  <p>My <strong>index.html</strong> js files included are:</p>
  
  <pre><code>&lt;script type="text/javascript" src="phonegap.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="PushNotification.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/lib/jquery.js" &gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/lib/handlebars.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/handlebars/helpers.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/plugins/fastclick.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="js/app.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>My <strong>config.xml</strong> plugins included are:</p>
  
  <pre><code>// plugins
  &lt;gap:plugin name="org.apache.cordova.console" /&gt;
  &lt;gap:plugin name="org.apache.cordova.device" /&gt;
  &lt;gap:plugin name="org.apache.cordova.geolocation" /&gt;
  &lt;gap:plugin name="org.apache.cordova.dialogs" /&gt;
  &lt;gap:plugin name="org.apache.cordova.inappbrowser" /&gt;
  &lt;gap:plugin name="org.apache.cordova.splashscreen" /&gt;
  &lt;gap:plugin name="com.phonegap.plugins.pushplugin" /&gt;
  // access to external domains
  &lt;access origin="*"/&gt;
  </code></pre>
  
  <p>My app.js call to pushNotification.register()</p>
  
  <pre><code>var app = {
  init: function() {
      document.addEventListener("deviceready", this.onDeviceReady, false);
      },
  
      onDeviceReady: function(){
         // DO STUFF
         // ....
  
         // ENABLE PUSH
         this.push_init();
      },
  
      push_init: function(){
          app.SENDER_ID = 123456789; // replaced by my actual GCM project no
  
          var pushNotification = window.plugins.pushNotification;
  
          pushNotification.register( 
              function(){alert('Push: win');}, // never called
              function(){alert('Push: Error');},  // never called
              { senderID: app.SENDER_ID, ecb: "app.push_android" }
          );
      },
     // never called
     push_android: function(e){
         alert('connection established...');
     console.log( 'successfully started android' );
     console.log( e );
     }
  
  };
  
  // start the app
  app.init();
  </code></pre>
  
  <p>After that is called nothing is executed, app.push_android() is a function of app object.</p>
  
  <p>If i don't enter a senderID I get an error saying no sender ID so I know that something is working. This is so frustrating any ideas?</p>
  
  <p><strong>PS - I also noticed something weird, when I console.log the window.plugins.pushNotification it returns an empty object, however I can still call window.plugins.pushNotification.register(), but I thought I would be visible inside the console.log.</strong></p>