Open mman opened 5 years ago
Hey @mman. I believe that when Parse starts it stores a UUID to the disk and then assigns that as the installationID, a major clue is here:
I think, if the installationID has not been saved to the cloud, it pulls the above one from disk:
So now, a potential solution would be to use a hardware identifier in addition to a randomly generated UUID. For example:
https://stackoverflow.com/a/2785493/5513305
Since the UUID is randomly generated, it changes on each install/uninstall. We would want to maintain that functionality. Perhaps we store the unique hardware identifier on each Installation object and check it against the FCM token? My brain is tired atm but if anybody can help sort out a nice algorithm that'd be great.
When the app using Parse Android SDK is saved to a backup and later restored from that backup on a new device, the
ParseInstallation.installationId
appears to remain the same, and now we have two devices with two app installations all fighting for the same_Installation
entry in the mongo database. Since those two app instances are now running on two different devices, this at least breaks push targeting.I'm trying to gather more details and figure out how to fix this and to understand how is the
installationId
generated but please give me a hand if someone knows how to address this.Thanks, Martin