Icon badge number stuck on 1 on Android

We’ve just pushed an update to Google Play, and a few users have told us that they are now seeing a “1” on their app icon, which doesn’t clear when they open the app. I’m also seeing it on my device.  

We haven’t changed anything to do with push or local notifications for months, and my understanding was that badge numbers don’t work on Android anyway.

When the app starts we’re calling this:

local notifications = require( "plugin.notifications" ) notifications.cancelNotification()

but that doesn’t seem to be clearing it either. We’re using OneSignal for push messages, but again we haven’t changed anything about our implementation of that for some time.

Any ideas if there is anything we’ve overlooked?

Just curious, which Android version are you seeing this on?

Both my device and the user’s device are 4.4.2. We think it happened on a device running 5.x, but the app has been uninstalled and reinstalled since then so we’re not 100% sure it was on that device.  

I’ve just checked and we’re also calling this as well on startup (the timer delay is because in the past we would occasionally get a runtime error if the function was called to quickly after init):

if OneSignal.ClearAllNotifications then timer.performWithDelay( 1000, OneSignal.ClearAllNotifications, 1 ) end

I was unware that Android allowed badges. Is this new in Android 7?

Anyway, see: https://docs.coronalabs.com/guide/events/appNotification/index.html#notification-badges

and see if that helps you clear the badge.

Rob

As I mentioned I’m on Android 4.4.2, so way off 7.0.  

I’ll give that function a try and see if that does the trick.

No luck. Still showing the badge number.

I test my app on multiple Android version up to and including 7 and have never seen a badge apart from on LG devices so I assume this is something custom to their ROM.

Since you’re using OneSignal, this is likely a feature they would need to support in their plugin. 

What devices are you seeing these on?

Rob

Just curious, which Android version are you seeing this on?

Both my device and the user’s device are 4.4.2. We think it happened on a device running 5.x, but the app has been uninstalled and reinstalled since then so we’re not 100% sure it was on that device.  

I’ve just checked and we’re also calling this as well on startup (the timer delay is because in the past we would occasionally get a runtime error if the function was called to quickly after init):

if OneSignal.ClearAllNotifications then timer.performWithDelay( 1000, OneSignal.ClearAllNotifications, 1 ) end

I was unware that Android allowed badges. Is this new in Android 7?

Anyway, see: https://docs.coronalabs.com/guide/events/appNotification/index.html#notification-badges

and see if that helps you clear the badge.

Rob

As I mentioned I’m on Android 4.4.2, so way off 7.0.  

I’ll give that function a try and see if that does the trick.

No luck. Still showing the badge number.

I test my app on multiple Android version up to and including 7 and have never seen a badge apart from on LG devices so I assume this is something custom to their ROM.

Since you’re using OneSignal, this is likely a feature they would need to support in their plugin. 

What devices are you seeing these on?

Rob