I am trying to synchronize timestamps between several Android devices, so I can run the task at the same time. I believe that I can use Timer and set the date based on System.currentTimeMillis (), but the problem is that the timestamps of several devices are far enough apart that I do not get the accuracy I want.
I look somewhere in the range of 50-100 ms, if possible. One of my ideas was to use Android Beam to send one deviceโs timestamp to another device and then calculate the delta, but it turns out that I need to get the timestamp before the message is actually sent and received (i.e. The longer the user waits for dispatch, the greater the delta will be), which makes this scheme completely fall apart.
How can I synchronize two or more devices so that their internal clocks are no more than 100 ms apart? Is this even possible without using an external server that saves time?
Any other suggestions on how to use something on multiple devices as close to each other as possible will also be welcome.
android
Norman lee
source share