Push notification not working when device is locked or idle for too long


#1

push notification not working when device is locked or idle for too long. I used exactly same code in here http://docs.ionic.io/docs/push-full-setup

.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
var push = new Ionic.Push({
“debug”: true
});

push.register(function(token) {
  console.log("Device token:",token.token);
  push.saveToken(token);  // persist the token in the Ionic Platform
});

});
})