12-02-2010 11:21 AM
Is there a way to be notified of a change to the system clock without having to poll the current time? Like a documented global event that we can rely on across platforms and OS versions?
Have an app that must trigger just once a day, exactly at midnight. Tried Timer.schedule(___, Date()), but apparently that converts the absolute date/time to an interval, because when the time changes, it triggers at the wrong time.
If the phone's uptime could be checked, then skew between System.currentTimeMilllis() and the uptime could be detected in a poll timer. But this is a background app, so it can't get the uptime from UI events, and I don't like polling when it can be avoided.
Solved! Go to Solution.
12-02-2010 11:34 AM
12-02-2010 01:19 PM
Thank you... also, this:
net.rim.device.api.util.DateTimeUtilities.GUID_DAT GUID for
the global event sent when the date changes.
for the global event sent when the timezone changes.
Except there doesn't seem to be a global event for when the time is adjusted, but the RealtimeClockListener will notify of that within a minute.