我的安卓应用程序要求将用户的设备设置为正确的时间。我目前正在通过检查设置中是否启用了自动日期和时间选项来执行此操作,但是我收到了设备中没有该选项的用户的投诉。使用时间服务器是一种选择,但考虑到慢速连接上的网络延迟,我必须确定近似值。我需要另一种解决方案的帮助。也许安卓系统用来获得正确时间的方法?提前感谢!
一个开箱即用的解决方案是尝试GPS时间。这需要您的应用程序具有GPS访问权限,并且您可以从GPS获取时间。
我的安卓应用程序要求将用户的设备设置为正确的时间。我目前正在通过检查设置中是否启用了自动日期和时间选项来执行此操作,但是我收到了设备中没有该选项的用户的投诉。使用时间服务器是一种选择,但考虑到慢速连接上的网络延迟,我必须确定近似值。我需要另一种解决方案的帮助。也许安卓系统用来获得正确时间的方法?提前感谢!
一个开箱即用的解决方案是尝试GPS时间。这需要您的应用程序具有GPS访问权限,并且您可以从GPS获取时间。
javascript python java c# php android html jquery c++ css ios sql mysql arrays asp.net json python-3.x ruby-on-rails .net sql-server django objective-c excel regex ruby linux ajax iphone xml vba spring asp.net-mvc database wordpress string postgresql wpf windows xcode bash git oracle list vb.net multithreading eclipse algorithm macos powershell visual-studio image forms numpy scala function api selenium