2

I am using https://github.com/phonegap/phonegap-plugin-push/ for push notification.

pushRegistry = window.PushNotification.init({
      android: {
          'senderID': 'appId'
      },
      ios: {
          alert: 'true',      
          badge: 'false',     
          sound: 'true'       
      }
});
pushRegistry.on('notification', function(data){
    console.log(data);
}); 

Now above event handler is invoked when a notification is received and app is closed. But it is not invoked if the app is running. I am using Chrome Device Debugger to check if event handler is invoked. I will appreciate any help on this.

Anant
  • 3,047
  • 2
  • 27
  • 33
  • Do you really mean that `console.log(data)` above or the toast notification actually? – Beat Dec 02 '15 at 19:10

0 Answers0