With Push Notifications, I can set the badge icon on iOS and Android.
However, I want to do the same with local notifications.
For example, I made a “Todos” app and I want to show the number of due items on the todo list in the badge on the app icon on iOS. How could I do that with local notifications?
In local notifications plugin there is a smallIcon
configuration option that can be used to set a global icon for local notifications.
If you want to set it per notification, the Notification types also have a smallIcon
property that can be used.
That is Android only, on iOS it uses the app icon.
With Capacitor 3, I found a solution for this: the badge plugin.