Type: public
void
Moves this AlarmData'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 AlarmData's preferences.
Parameter Name | Description |
---|---|
context | An active context instance. |
Type: public
String
Returns the user-defined "name" of the alarm, defaulting to "Alarm (1..)" if unset.
Parameter Name | Description |
---|---|
context | An active context instance. |
Returned Value: The alarm name, as a string.
Type: public
boolean
Returns whether the alarm should repeat on a set interval or not.
Returned Value: If repeat is enabled for this alarm.
Type: public
void
Sets the user-defined "name" of the alarm.
Parameter Name | Description |
---|---|
context | An active context instance. |
name | The new name to be set. |
Type: public
void
Change the scheduled alarm time.
Parameter Name | Description |
---|---|
context | An active context instance. |
manager | An AlarmManager to schedule the alarm on. |
timeMillis | The UNIX time (in milliseconds) that the alarm should ring at. This is independent to days; if the time correlates to 9:30 on a Tuesday when the alarm should only repeat on Wednesdays and Thursdays, then the alarm will next ring at 9:30 on Wednesday. |
Type: public
void
Set whether the alarm is enabled.
Parameter Name | Description |
---|---|
context | An active context instance. |
manager | An AlarmManager to schedule the alarm on. |
isEnabled | Whether the alarm is enabled. |
Type: public
void
Sets the days of the week that the alarm should ring on. If no days are specified, the alarm will act as a one-time alert and will not repeat.
Parameter Name | Description |
---|---|
context | An active context instance. |
days | A boolean array, with a length of 7 (seven days of the week) specifying whether repeat is enabled for that day. |
Type: public
void
Set whether the alarm should vibrate.
Parameter Name | Description |
---|---|
context | An active context instance. |
isVibrate | Whether the alarm should vibrate. |
Type: public
boolean
Return whether the alarm has a sound or not.
Returned Value: A boolean defining whether a sound has been set for the alarm.
Type: @Nullable
public
SoundData
Get the SoundData sound specified for the alarm.
Returned Value: An instance of SoundData describing the sound that the alarm should make (or null).
Type: public
void
Set the sound that the alarm should make.
Parameter Name | Description |
---|---|
context | An active context instance. |
sound | A SoundData defining the sound that the alarm should make. |
Type: @Nullable
public
Calendar
Get the next time that the alarm should wring.
Returned Value: A Calendar object defining the next time that the alarm should ring at.
Reference: java.util.Calendar Documentation
Type: public
Date
Set the next time for the alarm to ring.
Parameter Name | Description |
---|---|
context | An active context instance. |
manager | The AlarmManager to schedule the alarm on. |
Returned Value: The next Date at which the alarm will ring.
Type: private
void
Schedule a time for the alarm to ring at.
Parameter Name | Description |
---|---|
context | An active context instance. |
manager | The AlarmManager to schedule the alarm on. |
timeMillis | A UNIX timestamp specifying the next time for the alarm to ring. |
Type: public
void
Cancel the next time for the alarm to ring.
Parameter Name | Description |
---|---|
context | An active context instance. |
manager | The AlarmManager that the alarm was scheduled on. |
Type: private
PendingIntent
The intent to fire when the alarm should ring.
Parameter Name | Description |
---|---|
context | An active context instance. |
Returned Value: A PendingIntent that will open the alert screen.