I’m trying to update the badge on my app’s icon to a number depending on how many new messages my app has.
I’ve tried doing this through push notifications but this didn’t seem to work for capacitor and capacitor-fcm.
Or perhaps I did something wrong there.
Not to mention, my messages aren’t always sent with notifications. Sometimes a message is placed without notification, and in those cases the badge also needs to be updated, reflecting the amount of new messages.
In any case, what i’m trying to do is use:
To fetch information in the background from my api to see how many new messages there are since last time you had the app open.
It is then trying to use:
In order to set the badge when the app is in the background.
Setting the badge when the app is in the foreground works, but I can’t seem to find a way to do this while the app is in the background. AKA when using cordova-background-fetch.
Does anyone know of a good way to get this to work on ionic 4? Or at least how this should be handled?
Please let me know,