How to add a notification badge to the launcher app icon?

I’m new in ionic framework and I wonder whether it’s possible to have a badge on my application icon like facebook and whatsapp.
Thanks…

1 Like

Hope this helps for you.

3 Likes

It’s exactly what I’m looking for , thanks.

Did you get this to work? I am getting reference errors.

1 Like

Does this work for android too ?

No, this does not work android, there are only notifications.

You can patch push plugin notification with this pull request:

Found this plugin too:

Didn’t test it, but you can try.

hello all, I’m new in ionic framework.
Is there any someone has been successfully to add increase badge in icon?
i have success to implement push notification to my app according to this tutorial http://docs.ionic.io/docs/push-overview, but the badge when we receive notification not increase. how can i do it? i’m using platform android
thanks.

Badge not increase in Android, only supported in some launchers (Samsung, HTC, LG, Sony) with the plugin above.

Hello. I am testing with Samsung galaxy s4.

I have been trying with

http://ngcordova.com/docs/plugins/pushNotifications/

Seems none of them works badge increasing on push notification.
Technically these are working when app is active ( When you turn on the app ), But not working when the app is on background ( Turned off )

Anybody resolved this issue?

@raycon300
@Purusothaman
@jimibi
@stivekx

Only with:

This plugin makes the integration easier:

I did the same, On android, it is ok but on IOS, it is not show count of number notification on badge icon.
When I modify curl command to send notification, adding “badge”: true, on IOS, it just always show 1.
Do you look for solution?

1 Like

@Purusothaman Thanks Man ,
It works : )

Hi @IlexSquare, how do you implemented this plugin?
Do you use Ionic 2?
I am very confuse about this plugin.
Can you explain how do you solve?
Thanks!

@devrtc
i implemented this in ionic , but i will try to implement this in ionic 2 and let you know

for ionic 2, I found that I didn’t need to update the badge with a plugin for ios… I just put it in the payload of the notification itself. So, the payload looks like this:
{“aps”:{“alert”:“Hello from APNs Tester.”,“badge”:“3”}} that would update the badge to 3. (the “true” for your example would keep it at 1)

Since push notification are handled by iOS and not your app you can’t change the application badge on receiving a push notification… apparently then need to come from the payload itself, which means the calculations have to happen server side.

@stivekx shortcutBadger is a native plugin

Does anyone know how to update Badges in the background? Like when you App is in Background mode, but the number on your Phone screen increments without the need to open the App?

Many thanks!!:))

It works for Android