My app is just a brochure. Users can download compatible files to view (DOC, PPT, PDF, XLS, MP4, etc). If a newer version of a previously downloaded file is available I'd just like to update the badge icon on the app to alert the user their downloaded resources have updates.
So far all I see as a way to update a badge icon (outside previous ANEs that are said to be malfunctioning) is the new AIR 3.4 push notification updates. I see you can register to receive PUSH and if RemoteNotifier receives a notification event of type RemoteNotificationEvent.TOKEN it can adjust the badge?
I only wish to set the app icons badge number manually from inside the app, after I determine if there's any resources that need updating. I don't need push services. Is there an easy means that I'm simply not seeing to adjust the badge, such as somehow faking a RemoteNotificationEvent.TOKEN event or any classes I'm not seeing inside flash.notifications.*?
Thanks for any tips!
Updating badge from inside the app is a type of local notification. Unfortunately, local notifications are still not suppored in AIR. However, you can use native extensions for the same.
Some of the ANE links to get you started
Ah so by the time the app gets the event the iOS has already handled the local notification elsewhere. So AIR itself isn't doing it.
I found both of those links to be helpful and this one as well that was recommended by Adobe staff on only supporting push, not local notifications:
Thanks for clearing that up!
I mean the OS is handling the notifications on an OS level and then AIR is notified afterwards. AIR itself is just registering the app for the push. The push itself is sent to the device and on an OS level it is handled and then sent to the app as an event that has already happened. Is that correct?
You are mostly correct except the fact that on iOS, the OS may handle the notification and application may never get to know about it.RemoteNotificationEvent.NOTIFICATION is fired only in following two scenarios:
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.
Please refer to http://blogs.adobe.com/airodynamics/2012/05/29/push-notifications-supp ort-in-ios/ for more details.
Europe, Middle East and Africa