使用NTP服务 [英] use of ntp service
问题描述
我正在开发一个应用程序,需要控制在地球上任何地点的实时和做一些事情,当时间到来。同时,不依赖于系统的时间,因为用户可以很容易地改变它。
没有任何人有执行上的Android设备SNTP / NTP服务或有任何其他的解决办法做到这一点的经验?
谢谢
I'm developing an app that needs to control real time in any location on the Earth and do something when time comes. At the same time not to rely on system time because user can easily change it.
Does anybody have an experience of implementing "sntp/ntp" service on android device or is there any other solution to do it?
Thanks
推荐答案
退房SNTP客户端code为:
Check out the SNTP client code at:
<一个href="https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/net/SntpClient.java" rel="nofollow">https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/net/SntpClient.java
这篇关于使用NTP服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!