@kpsolutions wrote:
Hi,
I've managed to receive push notifications on my app following the push from scratch tutorial
However, something is really weird: the function I've defined as onNotification callback works only during the first run of the App. If I close the app, then opens it again, I DO get the notification, but I don't get the function I've defined as callback being called.
This is my code (inside a login Controller):
Ionic.io();
new Ionic.Push({
//"debug": true,
"onNotification": function(notification) {
alert('a');
},
"onRegister": function(data) {
alert('b');
}
});
push.register();I've already tried putting this code in the .run() function. Also no success... am I missing something here?
Posts: 1
Participants: 1