Updating Badges in the Background?

How can I update the Badge Number in the background? Like when my App is in the background or off, but the Badge number would still update on the Phone screen? (without the need to open the App)

Many thanks for any advice and recommendations!

This solves it when the App is open but in the background: https://ionicframework.com/docs/native/background-mode/

Still remains to be solved when you close the App and still want to send updates (update the Badge number).

What should trigger the updating of badges?

Push notifications can tell the OS (on iOS at least) what badge number to show.

Yes, push notifications should trigger the Badge Number update. I just don’t really know how… Excluding the case where the user actually clicks on a push notification. Any suggestions?

Short research led me to this: https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/PAYLOAD.md#badges

1 Like

thanks! works like a charm!

1 Like