0

我正在使用 android TAB 进行一些应用程序开发。在我的应用程序中,我从另一个应用程序(其他设备通过 TCP 套接字向我的应用程序提供)获取 UTC 时间。一旦我收到这个,我需要用接收时间更新时间。是否有任何api可以更改系统时间..?

4

1 回答 1

1
public static boolean setCurrentTimeMillis (long millis)

Sets the current wall time, in milliseconds. Requires the calling process to have appropriate permissions. [although Only system process can change the time]

User apps cannot set the time. Only the system processes can. This is for security, but also because I think it won't have much effect-- the time does reset from the radio via network time.

reference link

于 2012-07-12T17:54:05.683 回答