Urban Airship Push Notification Events not Firing/Listening


#1

I am trying to get the Urban Airship phonegap plugin to send me the device token/uuid after the device is registered. Everything seems to be working fine in the plugin (i.e. the console is saying it is registered and I can see it is at my admin console in Urban Airship site) but none of my app javascript is firing. I am calling my service configure() and that is running (the “************** PushNotification Service ************** 2” is logging) but none of the other listeners are working. Any ideas?

I am testing on a real device, and the push notification and all that is working fine, but just the event listeners arent firing :frowning: I have tried adding the event listeners directly in app.coffee under the ionic.ready, but no luck

services.coffee:

    module.factory "PushService", (segmentio) ->
      configure: ->
        console.log "************** PushNotification Service ************** 2"
        PushNotification.registerEvent "registration", (error, id) ->
          console.log "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
          console.log "$$$$$$$$$$$$$ REG $$$$$$$$$$$$$$$$$"
          console.log "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
          if error
            console.log "there was an error registering for push notifications"
          else
            console.log "Registered with ID: " + id
          return


        # Register for any urban airship events
        document.addEventListener "urbanairship.registration", ((event) ->
          console.log "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
          console.log "$$$$$$$$$$$$$ UA.REG $$$$$$$$$$$$$$$$$"
          console.log "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"

app.coffee:

$ionicPlatform.ready ->
    PushService.configure()