zendframework / ZendService_Google_Gcm

Implementation for ZF2 of a GCM 3rd party server (http://developer.android.com/guide/google/gcm/)
BSD 3-Clause "New" or "Revised" License
29 stars 49 forks source link

Adding support for push notifications to all devices by one request #26

Closed grey-dev-0 closed 7 years ago

grey-dev-0 commented 7 years ago

The changes proposed in this request is for supporting the new Topic push notification provided by Google, which allows the developers to send push notifications to all Android devices with one request instead of sending them in batches including multiple registration IDs.

juliangut commented 7 years ago

Fully supporting the "topic" concept by allowing setting the 'to' and 'condition' parameter seems a better solution

From Firebase documentation:

If only one device token is added to the message then message formatting (->toJson()) should not return 'registration_ids' key with only that one token but a 'to' key

In order to support /topics/global topic it could be a constant in the class to be used in ->setTo()

mwillbanks commented 7 years ago

PR #31 has a far better implementation on this just pending an issue with the condition area.