Good evening,
I'm trying to synchronize data between a server and an android device, the problem is I need to get the date and time that are the same as date and time in the server.
However using Simpledateformat and date will not work, since sometimes the device will be ahead of time for about 1-2 minutes which will cause a problem.
After searching I found this however I prefer another solution since I need my application to work even if there is no internet.
The sequence of actions that will be taken is as follows:
1- Every request will use the same date and time as the server. 2- Store that request on the local database. 3- Convert the date and time of the request to local time in order to display it on the phone.
Thanks for your help.