google cloud messaging - GCM 3.0: New registration does not expire tokens registered with GCMRegistrar -


we switching our notifications infrastructure use new gcm 3.0 registration mechanism using instance id api. using old mechanism using gcmregistrar.register() method.

the problem have have noticed if device registered old gcmregistrar, after update , registering new instance id api, both registration tokens valid , can receive notifications.

i expected old registration token deactivated , our push server receive canonical registration id when sending notification old token (as described here gcm registering 2 different working registration ids), application version has changed, such case seems not happen.

is correct behavior of gcm? there way can detect on push server device received new token (without unregistering app)?

i have received answer google support regarding issue. turned out intended behavior:

what observed in intended behavior due need support backward compatible registration id.

we recommend flag old registration id gcmregistrar() , don't use send anymore once have registration token gettoken(). (i believe has implemented solution detect such)

our solution remove old registration tokens our push server before registering new user.

we did not use gcmregistrar.unregister() observed able unregister new tokens (obtained via gettoken()).

update:

i wanted provide quick update interested in subject.

it seems issue fixed when tested our registration mechanism recently, turned out new gcm tokens replace (and unregister) old tokens.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -