Reputation: 89
For Google cloud messaging, is there a use for storing the token? Or can we just work with the registration id? Trying to setup push notifications and was wondering why they use both tokens and registration ids.
Upvotes: 0
Views: 435
Reputation: 89
Use the token on your server, to specify the device you want to send a message to. You, as a developer, have no significant use for the registrationID, in terms of actually sending the message.
Upvotes: 1
Reputation: 4371
From my understanding, token is used to authorize your application' access to Google Service while registration id is the unique identifier of an app on a specific device. GCM uses Registration ID to identify the device and app to send push notification to. So to answer your question, you need both of them.
Upvotes: 0