1

I would like to have number badges on my application Icon set with a LocalNotification (ie: how many items are still unread in the app after the last session). I set a local notification to test this behavior using the following code and on Android, all I get is a top-bar notification with the number 10 in it, but no badge:

LocalNotification n = new LocalNotification();
n.setId("updatedLearnableCountBadge");
n.setBadgeNumber(10);

Display.getInstance().scheduleLocalNotification(
  n,
  System.currentTimeMillis() + 1000, // fire date/time
  LocalNotification.REPEAT_NONE  // Whether to repeat and what frequency
);

Is Badging on Android not implemented yet, or am I doing something wrong?

LocalNotificaiton doesn't mention any special conditions required to make the "setBadgeNumber" display properly, but are there some undocumented platform-specific conventions I'm not following here?

Java-K
  • 387
  • 1
  • 10

1 Answers1

1

As far as I know Android itself doesn't support badging. It's a feature of iOS which we exposed due to user requirement but it can't be implemented outside of iOS to my knowledge.

Shai Almog
  • 49,879
  • 5
  • 30
  • 57
  • Thanks Shai. Turns out it's a feature of a few specific android launchers including the very popular Samsung default launcher on their devices, TouchWiz. I've gotten used to badges on apps on my Samsung devices but looking deeper into it, I see what you're saying: It's not a standard feature of Android that you could implement. Means I need to implement platform-specific behaviours and messages for the local Notificaitons. It is possible that you could implement it for the launchers out there that DO support badges as Samsung has a fairly large user base... – Java-K May 15 '17 at 14:35
  • Actually we can add device specific features, I haven't used touch wiz in a while so wasn't aware of that. You can file an RFE to add this: http://stackoverflow.com/questions/20136483/how-to-interface-with-the-badgeprovider-on-samsung-phones-to-add-a-count-to-the I doubt we'll have time in the near future but it is doable. You can also use a native interface to do this. – Shai Almog May 16 '17 at 05:14