Search code examples
androidsystemtime

Capturing an event when the Android system time is updated from the network


If a device has been configured with Settings->Date & time->Automatic date & time it will update it's system time when the device connects to the network (and the network can provide a time).

Is there an event that I can subscribe to, so that I know if and when this occurs?


Solution

  • There are broadcasts for those events. ACTION_TIME_CHANGED and ACTION_DATE_CHANGED

    ACTION docs at http://developer.android.com/reference/android/content/Intent.html#ACTION_DATE_CHANGED