Skip to main content
Known Participant
October 10, 2012
Question

Air 3.4 iOS Push Notification is not fired when app is not running and is not in background

  • October 10, 2012
  • 30 replies
  • 5655 views

Hello,

I'm making an Air iOS application which uses the iOS Push Notification from Air 3.4.

All is working perfectly except when I receive notifications when the app is not running and is not in background (The app is killed).

I suppose the RemoteNotificationEvent.NOTIFICATION must be dispatched when I receive a notification even if my app is not currently running or in background ?

Do you have already get the same issue ? Do you know what can prevent the notification to be handled ?

Thanks,

Loïc

This topic has been closed for replies.

30 replies

Adobe Employee
October 10, 2012

RemoteNotificationEvent.NOTIFICATION event is dispatched only in the following 2 cases:

  1. The application was in foreground when remote notification was received.
  2. The application was not in foreground when notification was received and as a result of the presented notification, the user taps the action button of the alert.

If the notification is delivered when the application isn’t running in the foreground, the system presents the notification, displaying an alert, badging an icon, perhaps playing a sound. And hence the event will not be dispatched. In other words, this event will NEVER be fired if application was in background(sleeping/dead) and user ignores the notification.

For more details refer to http://blogs.adobe.com/airodynamics/2012/05/29/push-notifications-support-in-ios/

Known Participant
October 10, 2012

Yes I read that.

But I understand that the RemoteNotificationEvent.NOTIFICATION must be dispatched if the user tap the notification even if the app is not running.

So I don't understand why RemoteNotificationEvent dispatch only the TOKEN and not the NOTIFICATION.

Adobe Employee
October 10, 2012

RemoteNotificationEvent.NOTIFICATION is dispatched if the user tap the notification even if the app is not running.

Did not understand your last comment though.