Skip to main content
sinious
Legend
September 5, 2012
Answered

iOS - Can you manually adjust badge on app icon?

  • September 5, 2012
  • 1 reply
  • 2674 views

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!

This topic has been closed for replies.
Correct answer vabhatia

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

http://juankpro.com/wordpress/2012/05/10/local-notification-ane-source-code/

http://www.as3gamegears.com/air-native-extension/local-notifications/

1 reply

vabhatiaCorrect answer
Adobe Employee
September 5, 2012

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

http://juankpro.com/wordpress/2012/05/10/local-notification-ane-source-code/

http://www.as3gamegears.com/air-native-extension/local-notifications/

sinious
siniousAuthor
Legend
September 5, 2012

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:

http://www.adobe.com/devnet/air/native-extensions-for-air/extensions/notification.html

Thanks for clearing that up!

Adobe Employee
September 5, 2012

Did not understand your comment "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."