-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Anish edited this page Dec 18, 2017
·
3 revisions
Welcome to the Spotify-Alarm wiki!
-
Using alarmManager.set(...) was not consistently triggering the alarm as needed. Found in the documentation -
Beginning with API 19 (KITKAT) alarm delivery is inexact: the OS will shift alarms in order to minimize wakeups and battery use. There are new APIs to support applications which need strict delivery guarantees; see setWindow(int, long, long, PendingIntent) and setExact(int, long, PendingIntent).
Switching to setExact fixed it.
-
RingtonePlayer must return START_NOT_STICKY to ensure that the alarm is reset at each instance
-
Having multiple classes with receiver (even in a separate folder) lead to the receiver class not being read and crashing the app