How to send a message to all registered users using android gcm?

I use android gcm to make push notifications for my users. Everything works so well. To send a notification, I need a user registration identifier to identify it. It is working. Now my problem is that I have several hundred users, and I would like to inform them ALL of some updates.

Is there a way to send a notification to all users? Do I need to click on them all my registration IDs?

On the server side, I use PHP and CURL, as shown in many examples here ...

+4
source share
2 answers

It is not possible to broadcast all users with a single message.

You need to send each identifier in blocks of up to 1000 identifiers. Therefore, if you have 2500 IDs, you need to break this down into 3 messages. 1-1000, 1001-2000, 2001-2500.

+5
source

If you want to use the new GCM themes, you can create a "all users" theme and start subscribing to this topic when it starts. Then one topic post can go to all users (I think the limit is one million, but you probably should check that out).

0
source

Source: https://habr.com/ru/post/1442046/


All Articles