-
Notifications
You must be signed in to change notification settings - Fork 76
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
Should onTokenRefresh() be included? #11
Comments
I will recommend doing |
Thanks! So the token won't change unless the app is terminated? Also, one thing I am curious, I first put the requestPermissions() method after the addListeners method as in the instructions but did not get the "register" event captured and didn't see the received token printed in console. However, putting the method before the listeners works. Shouldn't the listeners be lasting and the sequence of requestPermissions() not affect the event being caught by the listeners? |
Hmm.. Token refreshing should be handled better. I will implement it in the future and welcome a PR! I think the sequence of requestPermissions and listener matters. |
Now, putting the method after the listeners works too. It could be just that it took some time for the app to first time register. |
As mentioned in the GCM doc, onTokenRefresh() should be invoked if registration token changed. Currently this method is not included in the package. Should this method be implemented? or the registration token stays same unless manually changed so this method is optional.
GCM doc link: https://developers.google.com/cloud-messaging/android/client?configured=true
Thanks.
The text was updated successfully, but these errors were encountered: