Skip to main content
Known Participant
January 8, 2014
Answered

Why is the badge number removed?

  • January 8, 2014
  • 1 reply
  • 721 views

I have notifications enabled in my mobile Flex application and notifications are working fine, but, the Air SDK seems to remove the "badge" number automatically before the invoke (and activate) events are fired.  It's even noted as the standard behavior here: http://blogs.adobe.com/airodynamics/2012/05/29/push-notifications-supp ort-in-ios/

Not sure how it was determined that this logic was appropriate, which is obviously business logic and not normal behavior, but, I don't see a workaround to override.

I want to manage the badge numbers in the app, not have the Flex SDK decide when to remove the badge.  If you look at ANY application that uses the badge intelligently, you'll see it isn't removed when the app is fired up.

I'm looking for a workaround to set the badge back to it's original state, however, I don't think it's possible, since it looks like this is cleared before invoke/activate events.

Anyone know how this can be "fixed"?  I don't even see a way using ANEs (which I'm using to get/set the badge).

FYI, I posted this in the Flex community also, not sure which is more appropriate for this question.

This topic has been closed for replies.
Correct answer Neverbirth

Well, as you point out, this is by design, so this is the typical "open a bug report and ask for votes" situation. I guess this was made because Adobe should otherwise have designed an extra API to validate the notification, or to control the badge number, which is rather specific to iOS (although notifications are only supported on iOS anyway...).

What I've done in the past is get the payload data (in the app launched or the notification received event), get the set badge number, and if I still need the badge number place it again through any of the available ANEs out there.

1 reply

NeverbirthCorrect answer
Inspiring
January 10, 2014

Well, as you point out, this is by design, so this is the typical "open a bug report and ask for votes" situation. I guess this was made because Adobe should otherwise have designed an extra API to validate the notification, or to control the badge number, which is rather specific to iOS (although notifications are only supported on iOS anyway...).

What I've done in the past is get the payload data (in the app launched or the notification received event), get the set badge number, and if I still need the badge number place it again through any of the available ANEs out there.

Known Participant
January 10, 2014

Thanks for confirming.  I assume you mean open a bug report on Apache Flex, right?  I'll just go the set/reset on inactivate event for now.