我现在一直在研究一个半小时,我找不到如何为我的应用程序更改NTP服务器。
我知道它可以做到因为FasterGPS应用程序可以做到(它需要root,但我猜它只是需要因为它会改变所有应用程序的系统文件,而不仅仅是为自己)。
如何更改NTP服务器以便将其设置为pa.pool.ntp.org ?
PS:我正在使用Google Play服务获取GPS位置数据
I've been researching for an hour and a half now and I can't find how to change the NTP server for my app.
I know it CAN be done cause FasterGPS app can do it (it needs root, but i'm guessing it is only needed cause it would change a system file for all the apps, not just for itself).
How can I change the NTP server so I can set it pa.pool.ntp.org?
PS: I'm using Google Play Services for GPS location data
最满意答案
我现在一直在研究一个半小时,我找不到如何为我的应用程序更改NTP服务器。
在传统的Android开发中没有“[your] app的NTP服务器”。 如果您从系统中获取时间,则由系统决定时间来自何处(NTP,NITZ等)。
如果您找到一些SNTP库,欢迎您将其指向您想要的任何NTP服务器,然后使用该库从该服务器获取时间。
我正在使用Google Play服务来获取GPS位置数据
您不能影响Google Play服务使用的时间。 它将使用Google开发人员选择使用的任何内容,包括编译到应用程序中的库部分,以及包含大量Play服务功能的单独应用程序,例如实际的LocationClient工作。
I've been researching for an hour and a half now and I can't find how to change the NTP server for my app.
There is no "NTP server for [your] app" in conventional Android development. If you are getting the time from the system, it is up to the system to determine where that time comes from (NTP, NITZ, etc.).
If you find some SNTP library, you are welcome to point it to whatever NTP server that you want, and then use that library to obtain time from that server.
I'm using Google Play Services for GPS location data
You cannot affect the time that Google Play Services uses. It will use whatever the Google developers chose to use, both in the library piece that is compiled into your app, and in the separate app that houses a lot of the Play Services functionality, such as the actual LocationClient work.
更多推荐
发布评论