Alarms
alarm.getTitle()
Syntax
var title = alarm.getTitle(id);
Parameters
id
: A String
representing the alarm identifiers (example: "43C51F7E-FB89-49B3-B090-114AB2E1FB98"
)
Return value
A String
containing the alarm title
alarm.getHour()
Syntax
var hour = alarm.getHour(id);
Parameters
id
: A String
representing the alarm identifier
Return value
A Number
representing the hour of the alarm target time
alarm.getMinute()
Syntax
var minute = alarm.getMinute(id);
Parameters
id
: A String
representing the alarm identifier
Return value
A Number
representing the minute of the alarm target time
alarm.isEnabled()
Syntax
var snoozed = alarm.isEnabled(id);
Parameters
id
: A String
representing the alarm identifier
Return value
A Boolean
representing whether or not the alarm is enabled
alarm.isSnoozed()
Syntax
var snoozed = alarm.isSnoozed(id);
Parameters
id
: A String
representing the alarm identifier
Return value
A Boolean
representing whether or not the alarm is snoozed
alarm.getNextFireDate()
Syntax
var nextFire = alarm.getNextFireDate(id);
Parameters
id
: A String
representing the alarm identifier
Return value
A Date
object representing the next time the alarm would be activated
alarm.setHour()
Syntax
alarm.setHour(id, hour);
Parameters
id
: A String
representing the alarm identifier
hour
: A Number
representing the hour you’d like to set the alarm to
alarm.setMinute()
Syntax
alarm.setMinute(id, minute);
Parameters
id
: A String
representing the alarm identifier
minute
: A Number
representing the minute you’d like to set the alarm to
alarm.setEnabled()
Syntax
alarm.setEnabled(id, enabled);
Parameters
id
: A String
representing the alarm identifier
enabled
: A Boolean
representing whether alarm should be enabled or disabled
alarm.snooze()
Syntax
alarm.snooze(id);
Parameters
id
: A String
representing the alarm identifier