Ionic notifications 'onNotification' triggered twice on incoming notification


#1

For some reason this event triggers twice on an Android device on an incoming notification.
Any ideas why? Is this a known issue?

onNotification: function(notification) {
                // Handle new push notifications here:
                switch( notification.event )
                    {
                        case 'message':
                              // some code that is executed twice
                        break;
                    }
                return true;
            }

#2

maybe you put the onNotification callback multiple times on the document?


#3

No. I use it only once.
My server send only one notification but my device recieves two.
So wierd.