Reputation: 3530
Is there an intent in Android that is broadcasted on significant time changes such as a new day. I'm looking for something similar to the significant time change notification that is broadcasted in iOS. I'm trying to schedule processing to occur at the start of each day. I know this possible with AlarmManager but I wanted to avoid scheduling my own alarm if there is another way.
Upvotes: 2
Views: 1565
Reputation: 67502
The only time-related Intent
s in Android are:
ACTION_TIME_TICK
: Fired (only by the system) every minute.ACTION_TIME_CHANGED
: Fired when the device's time is set by the user.ACTION_TIMEZONE_CHANGED
: Fired (only by the system) when the device's timezone is changed.There is no "significant time change" intent, I'm afraid. The best I can suggest is to register under ACTION_TIME_TICK
and check if the time is equal to midnight or, as you said, using AlarmManager
.
You can find a full list of available intents in the documentation (hit contol+F and find "Standard Activity Actions" to get right to the list). "Broadcast Actions" are the ones you'd be interested in for this problem.
Upvotes: 9