Short or Frequent Alarm
Short or Frequent Alarm
Frequent alarms are bad for battery life. As of API 22, the AlarmManager
will override near-future and high-frequency alarm requests, delaying the alarm at least 5 seconds into the future and ensuring that the repeat interval is at least 60 seconds.
If you really need to do work sooner than 5 seconds, post a delayed message or runnable to a Handler.
Issue id: ShortAlarm
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3 |
Plugin: | Android, 2022.3.1 Beta 2 |
Last modified: 13 July 2023