I follow the example of GCM-Android from the official guide.
In particular, I got confused in the following lines in the class linked above:
Now I call the intent service every time my main view starts, and I believe that instanceID is responsible for initiating the token update.
Do I have to check the value of Shared Prefs every time I initiate this intention of registering GCM from my main activity. However, the update in this case will not be performed, because after the initial selection of the token, the condition will always be true.
Should I abandon the general logic of prefs - this way, a new token will be sent to my server every time. What is the right way to do this? How does the token update and when is it updated?
source
share