@Document(name = "builtin:AlarmInstance")
class AlarmInstance : Thing


AppSearch document representing an AlarmInstance entity.

An AlarmInstance must be associated with an Alarm. It represents a particular point in time for that Alarm. For example, if an Alarm is set to repeat every Monday, then each AlarmInstance for it will be the exact Mondays that the Alarm did trigger.

The scheduled time should be timezone independent so that it remains unchanged across timezones. E.g.: An AlarmInstance set to fire at 7am GMT should also fire at 7am when the timezone is changed to PST.

Summary

Constants

const Int

The AlarmInstance has been dismissed.

const Int

The AlarmInstance is firing.

const Int

The AlarmInstance has been missed.

const Int

The AlarmInstance is scheduled to fire at some point in the future.

const Int

The AlarmInstance has been snoozed.

const Int

The AlarmInstance is in an unknown error state.

Public functions

String

Returns the time that this is expected to fire in ISO 8601 format.

Long

Returns the length of time in milliseconds the AlarmInstance will remain snoozed before it fires again, or -1 if it does not support snoozing.

Int

Returns the current status.

Inherited functions

From androidx.appsearch.builtintypes.Thing
(Mutable)List<String!>

Returns an unmodifiable list of aliases, if any, for this item.

Long

Returns the creation timestamp, in milliseconds since Unix epoch, of this item.

String?

Returns a description of this item.

Int

Returns the intrinsic score (or importance) of this item.

Long

Returns the time-to-live timestamp, in milliseconds since getCreationTimestampMillis, for this item.

String

Returns the unique identifier for this item.

String?

Returns the URL for an image of this item.

String?

Returns the name of this item.

String

Returns the namespace (or logical grouping) for this item.

(Mutable)List<PotentialAction!>

Returns the actions that can be taken on this object.

String?

Returns the deeplink URL of this item.

Constants

STATUS_DISMISSED

Added in 1.1.0-alpha07
const val STATUS_DISMISSED = 3: Int

The AlarmInstance has been dismissed.

STATUS_FIRING

Added in 1.1.0-alpha07
const val STATUS_FIRING = 2: Int

The AlarmInstance is firing.

STATUS_MISSED

Added in 1.1.0-alpha07
const val STATUS_MISSED = 5: Int

The AlarmInstance has been missed.

STATUS_SCHEDULED

Added in 1.1.0-alpha07
const val STATUS_SCHEDULED = 1: Int

The AlarmInstance is scheduled to fire at some point in the future.

STATUS_SNOOZED

Added in 1.1.0-alpha07
const val STATUS_SNOOZED = 4: Int

The AlarmInstance has been snoozed.

STATUS_UNKNOWN

Added in 1.1.0-alpha07
const val STATUS_UNKNOWN = 0: Int

The AlarmInstance is in an unknown error state.

Public functions

getScheduledTime

Added in 1.1.0-alpha07
fun getScheduledTime(): String

Returns the time that this is expected to fire in ISO 8601 format. E.g.: 2022-01-14T00:00:00

The scheduledTime is a timezone independent date time. When used, it should be converted into a date time in the local timezone.

getSnoozeDurationMillis

Added in 1.1.0-alpha07
fun getSnoozeDurationMillis(): Long

Returns the length of time in milliseconds the AlarmInstance will remain snoozed before it fires again, or -1 if it does not support snoozing.

getStatus

Added in 1.1.0-alpha07
fun getStatus(): Int

Returns the current status.

Status can be either STATUS_UNKNOWN, STATUS_SCHEDULED, STATUS_FIRING, STATUS_DISMISSED, STATUS_SNOOZED, or STATUS_MISSED.