java-apns icon indicating copy to clipboard operation
java-apns copied to clipboard

Sending same notification to multiple devices

Open emresa37 opened this issue 7 years ago • 1 comments

Is there any way to send multiple notification without using loop. Like firebase's "registration_ids" ?

emresa37 avatar Oct 08 '18 07:10 emresa37

though this library has a method:

public Collection<EnhancedApnsNotification> push(Collection<String> deviceTokens, String payload);

It's not actually sending to multiple devices at once. The method implementation loops through the deviceTokens and send the push notification one by one.

From APN docs:

https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns

it seems apple does not allow sending to multiple devices in a single request.

Also from above link:

When sending many remote notifications, you can establish multiple connections to these servers to improve performance. For example, if you have multiple provider servers, each one can establish its own connection.

drunkendaddy avatar Apr 14 '19 17:04 drunkendaddy