When you want to change the mobile system date or time in your application, how do you go about doing it?
A:
If I'm reading it right the SystemClock class will do it... specifically the setCurrentTimeMillis(long) method.
fiXedd
2009-08-26 06:18:09
well,i have tried your propose, but it is likely that will not change the system time...
2009-08-27 02:41:31
Oh well, sorry.
fiXedd
2009-08-27 12:06:52
According to [this thread](http://groups.google.com/group/android-developers/browse_thread/thread/855ae4fe695d3e70), user apps cannot set the time, regardless of the permissions we give it
Casebash
2010-05-12 23:28:16
A:
According to this thread, user apps cannot set the time, regardless of the permissions we give it. Instead, the best approach is to make the user set the time manually. We will use:
startActivity(new Intent(android.provider.Settings.ACTION_DATE_SETTINGS));
Unfortunately, there is no way to link them directly to the time setting (which would save them one more click). By making use of ellapsedRealtime, we can ensure that the user sets the time correctly.
Casebash
2010-05-12 23:26:38