Added in API level 34

Stage

class Stage
kotlin.Any
   ↳ android.health.connect.datatypes.SleepSessionRecord.Stage

Captures the user's length and type of sleep. Each record represents a time interval for a stage of sleep.

The start time of the record represents the start and end time of the sleep stage and always need to be included.

Summary

Public constructors
Stage(startTime: Instant, endTime: Instant, stageType: Int)

Builds Stage instance

Public methods
open Boolean
equals(other: Any?)

open Instant

Returns end time of this stage.

open Instant

Returns start time of this stage.

open Int

Returns stage type.

open Int

Public constructors

Public methods

equals

Added in API level 34
open fun equals(other: Any?): Boolean
Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getEndTime

Added in API level 34
open fun getEndTime(): Instant

Returns end time of this stage.

Return
Instant This value cannot be null.

getStartTime

Added in API level 34
open fun getStartTime(): Instant

Returns start time of this stage.

Return
Instant This value cannot be null.

hashCode

Added in API level 34
open fun hashCode(): Int
Return
Int a hash code value for this object.