You can try out App42 backend services which provide auto increment of push badge count which is maintained on the server side. For more details you can follow the link of blog. Here is the blogpost conent:
Here are the few use cases that can be achieved through auto incremental badge count in App42 Push Notification.
For auto increment of push badge by 1, you need to send push message as shown below.
PushNotificationService pushNotificationService = App42API.BuildPushNotificationService (); // Initializing PushNotification Service.
string userName = "UserName";
string message= "{'badge':'increment'}";
pushNotificationService.SendPushMessageToUser(userName,message, new UnityCallBack())
N.B: The sample explained is for Unity/C# but the same process can be applied on others too.
If you want to stipulate any number for the badge or want to reduce the badge count to zero, you can use this method to update the count as the notification gets clicked by the user. You have to call updatePushBadgeforDevice or updatePushBadgeforUser in this case.
PushNotificationService pushNotificationService = App42API.BuildPushNotificationService (); // Initializing PushNotification Service.
string userName = "UserName";
string deviceToken = "DeviceToken";
int badges = 10; // For clear count make it 0
pushNotificationService.UpdatePushBadgeforDevice(userName, deviceToken, badges, new UnityCallBack());
PushNotificationService pushNotificationService = App42API.BuildPushNotificationService (); // Initializing PushNotification Service.
string userName = "UserName";
int badges = 10; // For clear count make it 0
pushNotificationService.UpdatePushBadgeforUser(userName, badges, new UnityCallBack());
updatePushBadgeforDevice
– This method is used to update push badge count of a particular device registered by the user .
updatePushBadgeforUser
– This method is used to update push badge count of all the devices that a user procures. In this case, we are assuming that the user has multiple devices registered under his name.