App badges display a number on top of your app's icon, letting users know how many unread notifications, messages, or events they have. By default, Progressier automatically updates this count based on the number of active notifications currently in the user's system tray. However, you can override this behavior and use your own custom count instead.
How to manage app badges
Enable the setting: In your dashboard, go to Danger Zone > High-Risk Settings and enable Manual app badges. This prevents Progressier from automatically updating the badge count between push requests.
Send via API: When sending a push notification programmatically, include the
unreadparameter in your API request. You dictate what "unread" means in your own business logic and pass that exact number to the API.Update client-side: Use
navigator.setAppBadge()in your client-side code to keep the badge synced whenever the user's unread count changes while they are using the app.
Important Warnings:
A. Enable the setting first: Do not set the unread parameter in your API requests without first turning on Manual app badges in your dashboard.
B. No automatic clearing: Once manual badging is enabled, Progressier will never clear the badge on its own. The number will only update when you send a new push request with the unread parameter or when you manually call navigator.setAppBadge().
Should you use this option?
Probably not. This feature is primarily designed for messaging apps. If you haven't explicitly felt the need to manage the badge count manually, leave Manual app badges disabled and omit the unread parameter from your API requests.
Limitations
The App Badging API is fully supported on iOS, macOS, and Windows. On Android, both PWAs and native apps will ignore custom counts, displaying either a generic notification dot or the total number of system notifications currently in the user's tray.
