Errata


#1

Top of the page 475,

You can only register one alarm for each PendingIntent. That is how [color=#FF0000]setServiceAlarm(boolean)[/color]
works when isOn is false: it calls AlarmManager.cancel(PendingIntent) to cancel the alarm for your
PendingIntent, and then cancels your PendingIntent.

There is no overloading method, so
setServiceAlarm(boolean) -> setServiceAlarm(Context, boolean)


#2

Good catch. Thanks!