AlarmBuilder

public final class AlarmBuilder extends IndexableBuilder<AlarmBuilder>

Builder to construct an Indexable for an alarm.

Constant Summary

String FRIDAY
String MONDAY
String SATURDAY
String SUNDAY
String THURSDAY
String TUESDAY
String WEDNESDAY

Public Method Summary

AlarmBuilder
setAlarmInstances(AlarmInstanceBuilder... alarmInstanceBuilders)
Sets the instances, if any, associated with this alarm.
AlarmBuilder
setDayOfWeek(String... daysOfWeek)
Sets the scheduled days for a repeating alarm.
AlarmBuilder
setEnabled(boolean enabled)
Sets whether or not the alarm is currently active and has at least one associated instance in the AlarmInstanceBuilder.SCHEDULED, AlarmInstanceBuilder.FIRED or AlarmInstanceBuilder.SCHEDULED state.
AlarmBuilder
setHour(int hour)
Sets the hour that the alarm will fire.
AlarmBuilder
setIdentifier(String identifier)
Sets the immutable unique identifier of the alarm.
AlarmBuilder
setMessage(String message)
Sets the custom message associated with this alarm.
AlarmBuilder
setMinute(int minute)
Sets the minute that the alarm will fire.
AlarmBuilder
setRingtone(String ringtone)
Sets the ringtone to be played when the alarm fires, as a content URI of the media to be played, or AlarmClock.VALUE_RINGTONE_SILENT if no ringtone will be played.
AlarmBuilder
setVibrate(boolean vibrate)
Sets whether or not to activate the device vibrator when the alarm fires.

Inherited Method Summary

Constants

public static final StringFRIDAY

Constant Value:"Friday"

public static final StringMONDAY

Constant Value:"Monday"

public static final StringSATURDAY

Constant Value:"Saturday"

public static final StringSUNDAY

Constant Value:"Sunday"

public static final StringTHURSDAY

Constant Value:"Thursday"

public static final StringTUESDAY

Constant Value:"Tuesday"

public static final StringWEDNESDAY

Constant Value:"Wednesday"

Public Methods

public AlarmBuildersetAlarmInstances(AlarmInstanceBuilder... alarmInstanceBuilders)

Sets the instances, if any, associated with this alarm.

public AlarmBuildersetDayOfWeek(String... daysOfWeek)

Sets the scheduled days for a repeating alarm.

Parameters
daysOfWeekMust be one or more of { MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY }.

public AlarmBuildersetEnabled(boolean enabled)

Sets whether or not the alarm is currently active and has at least one associated instance in the AlarmInstanceBuilder.SCHEDULED, AlarmInstanceBuilder.FIRED or AlarmInstanceBuilder.SCHEDULED state.

public AlarmBuildersetHour(int hour)

Sets the hour that the alarm will fire.

Parameters
hourMust be 0-23, inclusive

public AlarmBuildersetIdentifier(String identifier)

Sets the immutable unique identifier of the alarm.

public AlarmBuildersetMessage(String message)

Sets the custom message associated with this alarm.

public AlarmBuildersetMinute(int minute)

Sets the minute that the alarm will fire.

Parameters
minuteMust be 0-59, inclusive

public AlarmBuildersetRingtone(String ringtone)

Sets the ringtone to be played when the alarm fires, as a content URI of the media to be played, or AlarmClock.VALUE_RINGTONE_SILENT if no ringtone will be played.

public AlarmBuildersetVibrate(boolean vibrate)

Sets whether or not to activate the device vibrator when the alarm fires.