Android为GPS设置NTP服务器(Android set NTP server for GPS)

编程入门 行业动态 更新时间:2024-10-27 13:33:45
Android为GPS设置NTP服务器(Android set NTP server for GPS)

我现在一直在研究一个半小时,我找不到如何为我的应用程序更改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.

更多推荐

本文发布于:2023-04-27 20:33:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1328616.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:服务器   GPS   Android   NTP   server

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!