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

How to replace the current device token with the registration_id using GCM facade?[v2.3.4] #165

Open
wailaw opened this issue Jan 26, 2018 · 1 comment

Comments

@wailaw
Copy link

wailaw commented Jan 26, 2018

There's a case that a registration_id might be returned from the GCM response, in order to replace the corresponding device token.

How could I get that registration_id if exists by using the GCM facade? If parsing a JSON is needed, can anyone provide me an example of that JSON with the registration_id within a GCM facade response. Because I don't know how to produce this kind of response.

Thanks so much for the help!

@wailaw wailaw changed the title How to replace the current device token with the registration_id using GCM facade? How to replace the current device token with the registration_id using GCM facade?[v2.3.4] Jan 26, 2018
@aliemam
Copy link

aliemam commented Mar 5, 2018

Can you explain more?
as far as i understand you'r asking how you can get registration token from google (registration_id is channel, gcm use to make push to that device). you are not suppose to do anything, google provides you an sdk for android and ios. use that sdk. get their registration_id and pass it to your backend for further process (store or whatever you want). this registration ids might change any time google decide so you have to get it every time (like in an interval or whenever your app decide to call gcm to get or refresh its registration id). then you replace this registration id with current one you have.
or i just answer crap not relevant to your question

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

No branches or pull requests

3 participants