This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

change system time

I'm using Android ICS 4.0.3 on AM335_SK platform. I want to change the system programatically. I implemented a Dialog that implements TimePickerDialog.OnTimeSetListener (see below). However the setCurrentHour(), setCurrentMinute() methods for TimePicker do not change the system time. It seems that changing the time in System Settings->Time works but doing it programatically doesn't. Any ideas?

public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
        view.setCurrentHour(hourOfDay);
        view.setCurrentMinute(minute);
    }