After Android is rebooted OneSignal notifications do not reappear so the badge count value is no longer in sync with the number of notifications. Notifications should reappear or the counter should reset on boot.
May also be an issue when notifications are cleared programmatically.
same here.. can we hide these cadge counts? click on app but, cant delete the count number...
You can disable the auto badge counting until a fix is created by adding the following to your AndroidManifest.xml.
<application ...>
<meta-data android:name="com.onesignal.BadgeCount" android:value="DISABLE" />
</application>
If you still want badge support in your app but want to control it manually you can use the following library in your app.
https://github.com/leolin310148/ShortcutBadger
Thanks.
I added the metadata key but the badge still doesn't go away.
@sagar23jan The meta-data key keeps the SDK from updating the badge value. Android launchers remember the value unless you fully uninstall then reinstall the app. Android launchers seems to remember the value (tested Nova launcher) even if you fully uninstall and reinstall the app.
There are 3 possible workarounds if you have already released an app and want to clear this value.
ShortcutBadger.applyCount(context, 0); to OneSignal.initcom.onesignal package in your app project and call ShortcutBadger.applyCount(context, 0); from a static method. (no SDK modification required).I simply added the ShortcutBadger.applyCount(context, 0); after I init OneSignal in my application's code, which seems to work. Thanks for the workaround.
Thanks for workaround.
I've added my application ;)
On Sat, May 28, 2016 at 3:36 PM, Abhishek Sagar [email protected]
wrote:
I simply added the ShortcutBadger.applyCount(context, 0); after I init
OneSignal in my application's code, which seems to work. Thanks for the
workaround.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/one-signal/OneSignal-Android-SDK/issues/41#issuecomment-222306363,
or mute the thread
https://github.com/notifications/unsubscribe/AAL1JgVkDW1ICJCJFYqUc1rYbgT4TyB-ks5qGDa7gaJpZM4IPeuV
.
_Erhan Harmankaya_
Fixed in Release 2.5.0.
How to get Badge count? if we want to use Badge count in our app.
@shahzadiqbal Please see issue #87
Most helpful comment
You can disable the auto badge counting until a fix is created by adding the following to your
AndroidManifest.xml.If you still want badge support in your app but want to control it manually you can use the following library in your app.
https://github.com/leolin310148/ShortcutBadger
Thanks.