I have a problem with an application using GCM, the scenario is this:
- application installed
- the application calls the GCM register method, getting the registration identifier "RID-1"
- application uninstalled
- the application is installed again
- the application calls the GCM register method, again getting the registration identifier "RID-2"
In step 5, I need to get the previous registration ID so that I can update my model.
Limitations:
- I'm trying to do this without using external storage
- I canβt update the model when the server sends a message, this should be done after registration, because a new new profile is created in the application for each new device.
I know that this information is located on Google servers because it is sent to you when you send a message to the old registration ID. For example, if I send a message to "RID-1", in the response I get that the new (canonical) registration identifier is "RID-2" . I need a way to get this information without sending a message.
Let me know if you need more context.
I found some related questions, but the answers are not applicable to this scenario:
GCM Registration Identity Repeat
gcm canonical id should be updated or not
Gcm registration id stability
Google Cloud Messaging - Registration ID Status
Android GCM: how to detect registered canonical identifiers on my own server? Handling Google Cloud Messaging sign-in ID changes on Android
( @eran answered everything )
android push-notification google-cloud-messaging
pomber
source share