Skip to content
Mark Taylor edited this page Apr 1, 2014 · 4 revisions

getAlarm(id, successCallback, failureCallback)

Allows you to get an existing alarm

Parameters

  • id - integer - ID of the alarm to be retrieved
  • successCallback - function - The callback which will be called if the method is successful. The callback is passed the output (see below).
  • failureCallback - function - The callback which will be called if the method encounters an error. The callback is passed the output (see below).

Output

On success, the provided JSONObject will contain:

  • id - integer - ID of the alarm
  • when - String - the fully qualified classname of the Android Activity to be started on the alarm.
  • when - Date object - JavaScript Date object of when the alarm should be triggered. While this is stores internally as UTC, it will automatically be converted to local timezone.
  • showOption - String - Show Option controls how the alarm will display. See [ShowOption] (ShowOption) for possible values.
  • extras - JSON Object - User defined values that will be passed to the Activity that is started as a result of the Alarm.

On failure, the provided JSONObject will contain:

  • ErrorMessage - string - A textual description on why the function failed.

Also see

  • [getAlarms] (getAlarms)
Clone this wiki locally