Fix apnConnection typo and refactor to use function to log events
received notifications should be passed to  "Cordova.onNotificationAPN"