5
I am developing an application that will work offline on android
and sync with a version web
. I have a API
that will mediate this synchronization.
Currently the version android
has a timestamp
to control the changes in the record, and the idea was to synchronize with the API
check records with an update date longer than the last sync date.
But doubt is like controlling changes in the clock android
because the user may have a different time or date than the correct one. So it could occur that the time of the device is shorter than the last synchronization causing it not to send the changed data.
When starting the Android app ask the web service your UNIX Datetime, do the same with the android device calculate the difference and apply it to calculate the timestamp.
– ramaral
@ramaral your answer seems correct, why not put as an answer, so Alisson can accept as correct.
– Tulio F.
@Túliof. Maybe it’s not completely correct because it only works if the app has internet access.
– ramaral