1. Check out our companion app, Forums for Android! Download from Google Play

Can we change the device time using an application?

Discussion in 'Application Development' started by MGunetileke, Jun 25, 2010.

  1. MGunetileke

    MGunetileke New Member
    Thread Starter
    5

    Jun 25, 2010
    1
    0
    5
    Hi everyone..

    Trying to find out whether it is possible to change the TIME of the DEVICE using a third party application for us developers. Does the Android OS allow that kind of dev access to the device clock?

    If so, could you direct me to any API / Class which allows us to do so?
    (trying to find a definitive answer for a client.. :) )

    Thanks in advance!
     

    Advertisement

  2. Boogs

    Boogs Well-Known Member
    18

    Apr 6, 2010
    85
    16
    18
    While I don't know for sure, I would guess that you could only do that if you had a rooted phone. Normally that's only something that you can do with that permission.
     
  3. Boogs

    Boogs Well-Known Member
    18

    Apr 6, 2010
    85
    16
    18
    I looked a little more into it, and you might be able to set the system time. Try using setCurrentTimeMillis() in android.os.SystemClock It says that you need to have the appropriate permissions , but it may work.
     
  4. Boogs

    Boogs Well-Known Member
    18

    Apr 6, 2010
    85
    16
    18
    Use android.permission.SET_TIME in your manifest file and you should be golden.
     

Share This Page

Loading...