UMAR-MOBITSOLUTIONS
UMAR-MOBITSOLUTIONS

Reputation: 77984

What is the daily maximum limit to send GCM messages to android devices?

I am searching on stackoverflow & google related to this question but most of the people talking about limit of maximum number of messages sent to a device which is 100.

But my question is bit different,for example, if i have 100,000 users in my app and i need to send push notifications to all then what is the procedure?

referring to following google api documentation: https://developers.google.com/cloud-messaging/http-server-ref#downstream-http-messages-json

Second parameter: you can send only 1000 push notifications at once, then how can i send to 100,000 users? do i need to send 1000, 1000, 1000 etc.. in intervals same day? or maximum 1000 a daily limit?

any help would be appreciated.

Upvotes: 3

Views: 1899

Answers (1)

Tim
Tim

Reputation: 43314

Maximum number of messages a device can "collapse": 100. This means that if you send 100 messages without the device handling any of them, the 101th will not be received. This can happen if you send a lot of messages while the devices is shut down.

Maximum number of recipients one message can have for one request: 1000. This means that if you want to send a lot of messages, you must do so in batches of 1000

if i have 100,000 users in my app and i need to send push notifications to all then what is the procedure?

Since there is a limit of 1000 recipients per request, you will have to make 100 requests with the 100,000 registration ids spread over them.

A loop with 100 iterations can do the job, or process your users in batches of 1000.

It is the same for Firebase Cloud Messaging.

Upvotes: 4

Related Questions