Is possible to set System DateTime from my Android App? Is possible to set System DateTime from my Android App? android android

Is possible to set System DateTime from my Android App?


Eclipses,

I did quite a bit of checking for you on this and found an open ticket with Google to fix the problem. Only thing is the tag has been open since Nov 8, 2009. Basically only the system can change the time even with the Permission. According to comments on the link below a developer did some research and noted that when the permission SET_TIME was created, it wasn't given the appropriate protection level in the OS (signatureorSystem v.s dangerous). As a result it doesn't do what it is supposed to do.

http://code.google.com/p/android/issues/detail?id=4581

Here's an explanation of the various protection levels that permissions can have. Currently according to the developer cite above SET_TIME has "signatureorSystem" when it should have "dangerous".

http://developer.android.com/guide/topics/manifest/permission-element.html#plevel

In short there is currently no way to change the time programatically without rooting the phone.

One final note is that if you want to go with Custom roms there is also an open ticket for Cyanogenmod to add the ability to their rom as well.

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=CyanogenMod+SET_TIME

Hope this helps some,George


According to this post, SET_TIME is the correct permission but it will only work on a rooted phone.


we've done it. Not a big deal as long as you can get the SET_TIME pemission. See my answer to a similar question.

Regarding other answers stating that it's not possible without rooting the phone then this refers only to gaining the permission. For this see here and here.