Data type to capture sleep stages.
Sleep
This data type captures the user's length and type of sleep. Each data point represents a time interval for a stage of sleep.
The start time of the data point represents the start of the sleep stage and always needs to be included. The timestamp represents the end of the sleep stage. Time intervals don't need to be continuous but shouldn't overlap.
REST
Name | com.google.sleep.segment |
OAuth permission scopes |
https://www.googleapis.com/auth/fitness.sleep.read
https://www.googleapis.com/auth/fitness.sleep.write
|
Fields (format—units) | sleep segment type (int —enum)
Values representing different sleep stages and types.
|
Android
Name | com.google.sleep.segment |
Data type object | TYPE_SLEEP_SEGMENT |
Fields (format—units) | FIELD_SLEEP_SEGMENT_TYPE (int —enum)
Values representing different sleep stages and types.
|