SleepStages
Stay organized with collections
Save and categorize content based on your preferences.
Constants representing different sleep stages, such as light sleep, deep sleep. For a
Session
with
type FitnessActivities.SLEEP
,
Sleep activities can be stored and read in sleep
segment
data type, for the same time range, to provide a a more detail breakdown
of a user's sleep stages in one sleep session.
Constant Summary
int |
AWAKE
|
The user is in an awake period in the middle of
sleep session. |
int |
OUT_OF_BED
|
The user is out of their bed in the middle of a
sleep session. |
int |
SLEEP
|
The user is sleeping. |
int |
SLEEP_DEEP
|
The user is in a deep sleep cycle. |
int |
SLEEP_LIGHT
|
The user is in a light sleep cycle. |
int |
SLEEP_REM
|
The user is in a REM sleep cycle. |
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Constants
public static final int
AWAKE
The user is in an awake period in the middle of sleep session.
Constant Value: 1
public static final int
OUT_OF_BED
The user is out of their bed in the middle of a sleep session.
Constant Value: 3
public static final int
SLEEP
public static final int
SLEEP_DEEP
The user is in a deep sleep cycle.
Constant Value: 5
public static final int
SLEEP_LIGHT
The user is in a light sleep cycle.
Constant Value: 4
public static final int
SLEEP_REM
The user is in a REM sleep cycle.
Constant Value: 6
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`SleepStages` class provides constants representing different sleep stages like light, deep, REM sleep, awake, and out-of-bed states during a sleep session."],["These constants can be used with `FitnessActivities.SLEEP` sessions and `TYPE_SLEEP_SEGMENT` data type for detailed sleep analysis."],["Each sleep stage is represented by a unique integer constant (e.g., `AWAKE`, `SLEEP_DEEP`, `SLEEP_REM`)."],["The `SleepStages` class inherits methods from the `java.lang.Object` class, like `equals`, `hashCode`, and `toString`."]]],["`SleepStages` defines constants for different sleep stages within a sleep session, recorded in `sleep segment` data types for `FitnessActivities.SLEEP` sessions. Key stages include `AWAKE` (1), `OUT_OF_BED` (3), `SLEEP` (2), `SLEEP_DEEP` (5), `SLEEP_LIGHT` (4), and `SLEEP_REM` (6). These constants represent user states during sleep, allowing detailed tracking of sleep patterns. They can be used for sleep analysis and a more detail breakdown of the user sleep.\n"]]