Starting from API 19, setRepeating()
works the same way as setInexactRepeating()
.
What\'s the new way of setting an exact repeating alarm?
It doesn't exist, unfortunately. From the documentation:
Note: as of API 19, all repeating alarms are inexact. If your application needs precise delivery times then it must use one-time exact alarms, rescheduling each time as described above. Legacy applications whose targetSdkVersion is earlier than API 19 will continue to have all of their alarms, including repeating alarms, treated as exact.
In short, if you need exact repeating alams, you can create an alarm with setExact()
, but you'll need to handle the "repeating" part manually.