Skip to content
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

Make it clear whether or not message_id and registration_id can be set in a result at the same time #103

Open
hypesystem opened this issue Feb 23, 2015 · 1 comment
Labels

Comments

@hypesystem
Copy link
Collaborator

I don't know whether they can, but we need to clarify this in the upcoming documentation (#98).

Basically, when a result is returned from Sender#send, can it contain result.results entires that look like this, or are the two fields mutually exclusive (just like error is mutually exclusive with both message_id and registration_id):

{ message_id: "some-id", registration_id: "new-id" }
@eladnava eladnava added the docs label Dec 11, 2015
@eladnava
Copy link
Collaborator

eladnava commented Oct 3, 2016

It can definitely contain both message_id and registration_id.

message_id: String specifying a unique ID for each successfully processed message.
registration_id: Optional string specifying the canonical registration token for the client app that the message was processed and sent to. Sender should use this value as the registration token for future requests. Otherwise, the messages might be rejected.
https://developers.google.com/cloud-messaging/http-server-ref#table5

So, registration_id is the updated registration ID for a given device (sometimes GCM updates the registration ID and this is the mechanism to provide the app with the updated ID) and may be returned in addition to message_id, which is the unique ID of the message sent to the device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants