Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Increase Badge by 1 for thousands of users #164

Open
derwaldgeist opened this issue Aug 3, 2021 · 1 comment
Open

Question: Increase Badge by 1 for thousands of users #164

derwaldgeist opened this issue Aug 3, 2021 · 1 comment
Labels

Comments

@derwaldgeist
Copy link

derwaldgeist commented Aug 3, 2021

First off, thanks for this great package!

I have a question about best practices for sending out a notification to thousands or even hundreds of thousands of users (e.g. all users of an app) and setting the badge number accordingly. I've seen one can send all registration IDs in a batch, which is cool. But I haven't seen a way to send the correct badge numbers for these recipients at the same time. The badge seems to apply to all registrationIds at the same time.

Does that mean that I have to actually call send() hundreds of thousands times, and how do the target services (GCM and APN) cope with this immense flood of data? Or is there a mechanism that would just tell the device to increase the badge number by 1? What is the best practice here?

And in the case that you actually have to call sends() so many times, is it ok to do this in one big burst, or should this be done in (queued) chunks with some delay in between the chunks?

@alex-friedl
Copy link
Collaborator

@derwaldgeist Wouldn't you usually increase the badge counter in your mobile application for most use-cases, as only the app itself will know how many "open" notifications there are for each recipient?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants