public static interface HealthConstants.SleepStage extends HealthConstants.SessionMeasurement
NREM sleep consists of the following stages: - Light: In light sleep, the user transits from wakefulness to sleep. The user's breading and heart rate become regular and the user's body temperature drops. - Deep: In deep sleep, the user becomes less responsive to the user's surroundings. The user's breathing slows and his/her muscles are more relaxed. This is the stage when the user's body restores and recharges itself.
In REM sleep, the user's body is relaxed and immobile while the user's brain becomes more active and re-energizes itself for the next day. This is the stage when the majority of the user's dreams occur.
Awake includes the times you wake up briefly and the periods the user is restless during a sleep.
HealthConstants.Sleep
includes only the start and end time of the user's sleep.
SleepStage
gives detailed sleep stage information with several sections for the specified Sleep
data.
The sleep stage can be presented as the following figure.
Sleep data is saved as "Sleep #1" if HealthConstants.Sleep
is used only.
Otherwise, "Sleep #2" data that is composed of HealthConstants.Sleep
and HealthConstants.SleepStage
.
It shows:
SLEEP_LIGHT
for 23:30 ~ 00:40 of the next day.SLEEP_DEEP
for 00:40 ~ 02:00.SLEEP_REM
for 02:00 ~ 05:10.SLEEP_AWAKE
for 05:10 ~ 06:30.Properties of the following extending interfaces are available for this data type.
Sleep stage data has the following properties.
Property name | Description |
---|---|
HealthConstants.SleepStage.DEVICE_UUID | [Mandatory] Device identifier which provides the health data |
HealthConstants.SleepStage.START_TIME | [Mandatory] UTC milliseconds when the measurement is started |
HealthConstants.SleepStage.END_TIME | [Mandatory] UTC milliseconds after the measurement has ended |
HealthConstants.SleepStage.TIME_OFFSET | [Mandatory] Time offset in milliseconds which considers the time zone and daylight saving time |
HealthConstants.SleepStage.SLEEP_ID | [Mandatory] The specified sleep data's ID |
HealthConstants.SleepStage.STAGE | [Mandatory] Sleep stage |
HealthConstants.SleepStage.CUSTOM | Custom info which is formatted with JSON and compressed data |
HealthConstants.Sleep
Modifier and Type | Field and Description |
---|---|
static String |
HEALTH_DATA_TYPE
Data type name for sleep stage data.
|
static String |
SLEEP_ID
The specified sleep data's ID.
|
static String |
STAGE
Sleep stage.
|
static int |
STAGE_AWAKE
Awaken stage of sleep.
|
static int |
STAGE_DEEP
Deep stage of sleep.
|
static int |
STAGE_LIGHT
Light stage of sleep.
|
static int |
STAGE_REM
REM (Rapid Eye Movement) stage of sleep.
|
END_TIME, START_TIME, TIME_OFFSET
CREATE_TIME, CUSTOM, DEVICE_UUID, PACKAGE_NAME, UPDATE_TIME, UUID
static final String SLEEP_ID
Set this property with UUID
of HealthConstants.Sleep
.
It's the ID of "Sleep #2" data in the example figure.
String
static final String STAGE
int
static final int STAGE_AWAKE
STAGE_AWAKE
includes the times you wake up briefly and
the periods the user is restless during a sleep.40001
.STAGE
,
Constant Field Valuesstatic final int STAGE_LIGHT
STAGE_LIGHT
, the user transits from wakefulness to sleep.
The user's breading and heart rate become regular and the user's body temperature drops.40002
.STAGE
,
Constant Field Valuesstatic final int STAGE_DEEP
STAGE_DEEP
, the user becomes less responsive to the user's surroundings.
The user's breathing slows and his/her muscles are more relaxed.
This is the stage when the user's body restores and recharges itself.40003
.STAGE
,
Constant Field Valuesstatic final int STAGE_REM
STAGE_REM
, the user's body is relaxed and immobile while the user's brain becomes more active and re-energizes itself for the next day.
This is the stage when the majority of the user's dreams occur.40004
.STAGE
,
Constant Field Valuesstatic final String HEALTH_DATA_TYPE
"com.samsung.health.sleep_stage"
to add permission to the manifest file.Copyright © Samsung Electronics, Co., Ltd. All rights reserved.