We have an application that uses GCM. When the user first opens the application, the application checks the general settings to see if the user is previously registered. If the registration ID is not taken from GCM and is not stored in general preferences. There is also a third-party server that stores user IDs and registration IDs. I read and executed the following cases for canonical errors:
- When sending a notification, if a new registration identifier (canonical identifier) ββis received, the old registration identifier is updated with the canonical identifier on the third-party server.
- When the user uninstalls the application and when the third-party server sends a notification about the removal of the application registration identifier, an unregistered message is not registered, and the registration identifier is deleted from the third-party database.
As a developer, we have many registration identifiers stored in the database. Because we often uninstall and install the application. Usually the user will not do this. Then we looked at using the device identifier as a unique identifier for the device and checking whether the user was previously registered. Can I use the Android device id for this? What should I consider to prevent multiple registration identifiers for a device? These multiple registration identifiers cause multiple taps on the Android device. Multiple registration identifiers are mainly caused by:
- The application has been recently uninstalled and reinstalled. How can I detect that a user has been deleted and installed and already has a login ID?
- The cache has been cleared and / or data has been deleted for the application recently. How can I detect that the user has cleared the application data and already has a registration identifier?
What is the best practice for handling canonical identifiers?
android canonical-link google-cloud-messaging
Murat
source share