-
Notifications
You must be signed in to change notification settings - Fork 48
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
Notifications - Device association #16
Comments
Might as well add this here sorry vairix: Other than having it for |
@vairix-ssierra you are right, the notification should not be limited to only one device. In fact, in the README, one of the To Do's that are pending is "- Implement “broadcasting” sending and processing responses to multiple registration id’s within one request. Currently only one message to a single registration id is implemented." |
@csgavino the reason the relationship exists between a notification and a device is because Google requires a notification to contain the registration id's to which that notification will be sent. For the app I am working on, I need to know what notification was sent to which devices, which I am assuming might be the majority of cases too. |
@dondeng I've just made a pull request that 'solves' this issue.
|
Couple things:
|
Assuming the notification sender is always the rails application..
I don't understand why the notification only
belongs_to :device
instead ofhas_and_belongs_to_many :devices
.Adding this relation will allow to automatically generate the appropriate json to send to GCM in order to send one notification to multiple devices (instead of adding each
registration_id
"manually").What do you think? Is there a reason why the notification is associated to only one device?
The text was updated successfully, but these errors were encountered: