2

Asking for a friend…

When using Marketing Cloud to send push notifications, the red badge counter is often only increasing instead of being reset.

We tried using the specific method resetBadgeCount, but no luck.

Is there something specific that needs to be done either on the cloud or in the app to make sure the counter is reset as soon as the app is open?

Some clarifications from my shy developer colleague:

Each time the application has the badge number greater than 0, it calls the JB4ASDK method to reset it.

According to documentation it looks like this: [[ETPush pushManager] resetBadgeCount];

The Marketing Cloud server continues increasing the badge number although the application refreshes badge counter to 0.

The badge number counter on server was checked after 10 and 60 minutes.

Steps to reproduce:

  1. Send manual push notification to the device with specific system token.
  2. Check if the mobile app has badge number '1' after the receiving of push notification.
  3. Open the application. On this step the app calls [[ETPush pushManager] resetBadgeCount]
  4. Minimize the app and check if the badge number disappeared, i.e. the badge number was reset locally.
  5. Wait some time 10-60 minutes for server synchronization.
  6. Send another manual push notification to the same device.
  7. Check the application badge number.

Actual result: The badge number shows '1' after 1st message and '2' after the 2nd message.

Expected result: The badge number shows '1' after 1st message and also '1' after the 2nd message.

  • Can you please share the solution for this issue? I am also in a similar kind of situation. – Chandan May 5 '17 at 7:34
2

To quote the current documentation (ETPush.h)

/** Reset the application's badge number to zero (aka, remove it). Call updateET to refresh the server with the current badge number. Note: updateET may not be fully processed by the server for a number of minutes; the server's badge value may be out of sync with the app for a short amount of time.

*/ -(void)resetBadgeCount;

You'd want to follow a call to resetBadgeCount with a call to updateET which will ensure that the Marketing Cloud server (the push system's source of badge truth) reflects the state of the device.

Brian Criscuolo

Salesforce

  • We tried this, and it just didn't work. The badge counter kept increasing. PS: According to the official docs: > A call to resetBadgeCount includes a call to updateET, which sends a registration with a badge count value of zero. Registrations are processed every few minutes in batch. You can keep the device and the device record in sync if you only send notifications with badge updates once every 10 minutes. – Gabriel R. Dec 6 '16 at 16:42
  • 2
    The above reference in the official docs has been cleaned up for our next release in favor of what I've noted from the header. Apologies for the inconsistency. – Brian M. Criscuolo Dec 7 '16 at 19:50
0

If you mean the badge number in SpringBoard, why not just reset the property yourself?

UIApplication.shared().applicationIconBadgeNumber = 0
  • Hey stranger! Long time no see! – DavidSchach Dec 6 '16 at 23:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.