Updating Badge count silently (no push notification)

#1

Hey everyone,

I’d like to update the badge count on my app without a push notification.

We send 1 push notification every morning (should be visible)
We would like to update the badge count 2x a day without showing a push notification (things we handle behind the scenes).

I know I can use setBadgeNumberAsync to set the badge number, but can I set the badge number w/o a notification using Expo?

I’m assuming this would be done with Background App Refresh?

Thank you!

0 Likes

#2

The mechanism for setting the badge count on iOS is through a local notification. You should be able to set the badge number locally without a push notification nor displaying a message.

1 Like

#3

Hey James,

Thanks for the reply! Even if the app isn’t open? We process data in the background and if the # of active items goes down, we want to update the badge to reflect that too, even if you’re not using the app.

0 Likes

#4

If you are able to run code in the background (this is the tricky part), calling that API should work.

1 Like

closed #5

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

0 Likes