Projects Alarmio Docs TimerData

onIdChanged

Type: public void

Moves this TimerData's preferences to another "id".

Parameter Name Description
id The new id to be assigned
context An active context instance.

onRemoved

Type: public void

Removes this TimerData's preferences.

Parameter Name Description
context An active context instance.

isSet

Type: public boolean

Decides if the Timer has been set or should be ignored.

Returned Value: True if the timer should go off at some time in the future.

getRemainingMillis

Type: public long

Get the remaining amount of milliseconds before the timer should go off. This may return a negative number.

Returned Value: The amount of milliseconds before the timer should go off.

getDuration

Type: public long

The total length of the timer.

Returned Value: The total length of the timer, in milliseconds.

setDuration

Type: public void

Set the duration of the timer.

Parameter Name Description
duration The total length of the timer, in milliseconds.
context An active Context instance.

setVibrate

Type: public void

Set whether the timer should vibrate when it goes off.

Parameter Name Description
context An active Context instance.
isVibrate Whether the timer should vibrate.

hasSound

Type: public boolean

Return whether the timer has a sound or not.

Returned Value: A boolean defining whether a sound has been set for the timer.

getSound

Type: @Nullable public SoundData

Get the SoundData sound specified for the timer.

Returned Value: An instance of SoundData describing the sound that the timer should make (or null).

setSound

Type: public void

Set the sound that the timer should make.

Parameter Name Description
context An active context instance.
sound A SoundData defining the sound that the timer should make.

set

Type: public void

Set the next time for the timer to ring.

Parameter Name Description
context An active context instance.
manager The AlarmManager to schedule the timer on.

setAlarm

Type: public void

Schedule a time for the alert to ring at.

Parameter Name Description
context An active context instance.
manager The AlarmManager to schedule the alert on.

cancel

Type: public void

Cancel the pending alert.

Parameter Name Description
context An active context instance.
manager The AlarmManager that the alert was scheduled on.

getIntent

Type: private PendingIntent

The intent to fire when the alert should ring.

Parameter Name Description
context An active context instance.

Returned Value: A PendingIntent that will open the alert screen.