title: cordova - Android push notifications not received when app is closed
body: <p>I'm currently working on Android (Cordova) App and I'm using  OneSignal push notifications. First of all, push notifications were not delivered if I close the app, so I had to add a Cordova plugin to keep my app running in the background :</p>
  
  <pre><code>cordova.plugins.backgroundMode.enable();
  </code></pre>
  
  <p>The problem is, when I boot my phone I cannot receive push notifications (Because deviceready is not fired). Until I open the app.</p>
  
  <p>Is there a solution to immediately start push notifications service after device boot, like something running in the background ? </p>
  
  <p>My code after deviceready : </p>
  
  <pre><code>    cordova.plugins.backgroundMode.enable();
  
      var notificationOpenedCallback = function(jsonData) {
      console.log('didReceiveRemoteNotificationCallBack: ' + JSON.stringify(jsonData));
    };
  
      window.plugins.OneSignal.init( "my-api-key",
                                          {googleProjectNumber: "7-cant-share-it"},
                                          app.didReceiveRemoteNotificationCallBack);
      }
  </code></pre>
  
  <p>Thanks.</p>