Get Real Time – Not Device Set Time in android
You need to use the NTP (Network Time Protocol) protocol: Here is some code I found somewhere else… and I am using it. This uses the Apache Commons library, which can be installed using Gradle (adding a dependency on commons-net:commons-net:3.6) If you need a list of time servers, check: http://tf.nist.gov/service/time-servers.html Here is some Java Code … Read more