Closed Davidezrajay closed 4 years ago
Need to work across app re-install.
General idea: if sequence is not greater than greatest sequence from this device, skip insert and return 201.
But, on reinstall sequence 1 will reappear.
Modification: If sequence is not greater than the MOST RECENT sequence from this device, skip insert and return 201.
But, still doesn't allow us to go back to zero.
Modification: If sequence is not greater than the MOST RECENT sequence from this device, skip insert and return 201 unless the sequence is 1 and the coordinates of the most recent sequence 1 do not match the current record.
We might also want to write every upload out to a log file, so that issues like this can be tracked.
our devices table also tracks just the android_id, which is phone specific, and not an app installation specific Id. This means that users running both our default flavor and the JustDigIt flavor (such as testers) will run into problems with sequence numbers. should we create separate entries in devices for different flavors. Devices also needs created_at, updated_at fields.
This is to prevent the phone from sending multiple sequences. May already been done in the app, could just be an API + server-side issue