com.samsung.android.sdk.healthdata
Interface HealthConstants.Sleep
-
- All Superinterfaces:
- HealthConstants.Common, HealthConstants.SessionMeasurement
- Enclosing class:
- HealthConstants
public static interface HealthConstants.Sleep extends HealthConstants.SessionMeasurement
This interface defines sleep data of the user.It includes only the start and end time of sleep. If you want to log detailed sleep data, use
HealthConstants.SleepStage
with this data type.Properties
Properties of the following extending interfaces are available for this data type.
Sleep data has the following properties.
See more common properties by spreading this section out.Property name Description HealthConstants.Sleep.DEVICE_UUID [Mandatory]
Device identifier which provides the health dataHealthConstants.Sleep.START_TIME [Mandatory]
UTC milliseconds when the measurement is started
(when the user goes to bed)HealthConstants.Sleep.END_TIME [Mandatory]
UTC milliseconds after the measurement has ended
(when the user wakes up)HealthConstants.Sleep.TIME_OFFSET [Mandatory]
Time offset in milliseconds which considers the time zone and daylight saving timeHealthConstants.Sleep.COMMENT Comment HealthConstants.Sleep.CUSTOM Custom info which is formatted with JSON and compressed data Data Permission
The user's consent is required to read or write this data type. HealthPermissionManager.requestPermissions() displays a data permission UI to the user.
See Permission Manager and request data permission.- Since:
- 1.0.0
- See Also:
HealthConstants.SleepStage
-
-
Field Summary
Fields Modifier and Type Field and Description static String
COMMENT
Comment for data.static String
HEALTH_DATA_TYPE
Data type name for sleep data.-
Fields inherited from interface com.samsung.android.sdk.healthdata.HealthConstants.SessionMeasurement
END_TIME, START_TIME, TIME_OFFSET
-
Fields inherited from interface com.samsung.android.sdk.healthdata.HealthConstants.Common
CREATE_TIME, CUSTOM, DEVICE_UUID, PACKAGE_NAME, UPDATE_TIME, UUID
-
-
-
-
Field Detail
-
COMMENT
static final String COMMENT
Comment for data.- Optional
- Type:
String
- Value length: 0 ~ 255
- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
HEALTH_DATA_TYPE
static final String HEALTH_DATA_TYPE
Data type name for sleep data.
Use"com.samsung.health.sleep"
to add permission to the manifest file.- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
-