In the UPS we are using an API from Google: http://developer.android.com/reference/com/google/android/gcm/server/Constants.html#ERROR_INVALID_REGISTRATION
And on their generic doc, they also speak about the same "InvalidRegistration" error response code: https://developer.android.com/google/gcm/http.html#error_codes
And yes, it also has the "ERROR_NOT_REGISTERED" - which is clearly (reading the JavaDoc) for cases of uninstall.
Therefore the correct solution on the UPS is _NOT_ to only check for "ERROR_NOT_REGISTERED" (instead of "ERROR_INVALID_REGISTRATION"), _but_ it should check for both error response codes. That was my original guess that we are currently not checking for enough error response codes for the token (aka registrationId ) .
I will send a PR tomorrow morning, my time
|