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. |
Type: public
void
Removes this TimerData's preferences.
Parameter Name | Description |
---|---|
context | An active context instance. |
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.
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.
Type: public
long
The total length of the timer.
Returned Value: The total length of the timer, in milliseconds.
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. |
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. |
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.
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).
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. |
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. |
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. |
Type: public
void
Cancel the pending alert.
Parameter Name | Description |
---|---|
context | An active context instance. |
manager | The AlarmManager that the alert was scheduled on. |
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.