Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70429

Push Notification notificationCallback working only once

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>