Search code examples
androidalarmmanageralarm

Repeating Alarm in Android


What is the best way to implement repeating alarm in my android application? Every user selects a specific time and I want to notify them when this time approaches on daily bases. I have come across this, but I am wondering whether this is the best way?


Solution

  • The alarm manager should meet your needs. There is no better way except for maybe having a server ping your client.

    Since android really doesn't like things that repeat on a predictable interval, and since recent versions don't let you repeat on an exact fixed interval anyway, you'll need to schedule the alarm at the time you want, and then when that alarm fires, schedule a new one for the next day at the time you want.