获取Android设备和用户独立的时间 [英] Get device and user independent time in android

查看:108
本文介绍了获取Android设备和用户独立的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ŸAndroid应用我想使用时间不来的设备,而是一个标准的时间,用户不能更改。 有没有办法做到这一点。

y android application i would like to use time which do not come from device but a standard time that the user cannot change. Is there any way to do this.

请分享您宝贵的建议。

在此先感谢:)

推荐答案

您可以使用NTP从任何公共NTP服务器获取时间。你可以阅读的例子SNTP客户端code对Java 这里

You can use NTP for fetching the time from any of the public NTP servers. You can read the example SNTP client code for java here.

这篇关于获取Android设备和用户独立的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆