Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //push notifications handler
- document.addEventListener('push-notification', function(event) {
- var notification = event.notification;
- // navigator.notification.alert(notification.aps.alert);
- //to view full push payload
- // navigator.notification.alert(JSON.stringify(notification));
- //reset badges on icon
- pushNotification.setApplicationIconBadgeNumber(0);
- });
- if( typeof(notification.u.url) != "undefined" ) {
- // do whatever here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement