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.