public static interface HealthConstants.HeartRate extends HealthConstants.SessionMeasurement
Properties of the following extending interfaces are available for this data type.
Heart rate data has the following properties.
Property name | Description |
---|---|
HealthConstants.HeartRate.DEVICE_UUID | [Mandatory] Device identifier which provides the health data |
HealthConstants.HeartRate.START_TIME | [Mandatory] UTC milliseconds when the measurement is started |
HealthConstants.HeartRate.END_TIME | [Mandatory] UTC milliseconds after the measurement has ended |
HealthConstants.HeartRate.TIME_OFFSET | [Mandatory] Time offset in milliseconds which considers the time zone and daylight saving time |
HealthConstants.HeartRate.HEART_RATE | [Mandatory] Heart rate value |
HealthConstants.HeartRate.HEART_BEAT_COUNT | Total heart beat count for measurement time |
HealthConstants.HeartRate.MIN | Min value in BINNING_DATA |
HealthConstants.HeartRate.MAX | Max value in BINNING_DATA |
HealthConstants.HeartRate.BINNING_DATA | Continuous heart rate |
HealthConstants.HeartRate.COMMENT | Comment |
HealthConstants.HeartRate.CUSTOM | Custom info which is formatted with JSON and compressed data |
Modifier and Type | Field and Description |
---|---|
static String |
BINNING_DATA
Continuous heart rate which is formatted with JSON and compressed data.
|
static String |
COMMENT
Comment for data.
|
static String |
HEALTH_DATA_TYPE
Data type name for heart rate data.
|
static String |
HEART_BEAT_COUNT
Total heart beat count for measurement time.
|
static String |
HEART_RATE
Heart rate value, beats per minute (bpm).
|
static String |
MAX
Max value in
BINNING_DATA . |
static String |
MIN
Min value in
BINNING_DATA . |
END_TIME, START_TIME, TIME_OFFSET
CREATE_TIME, CUSTOM, DEVICE_UUID, PACKAGE_NAME, UPDATE_TIME, UUID
static final String HEART_RATE
float
static final String HEART_BEAT_COUNT
int
static final String COMMENT
String
static final String MIN
BINNING_DATA
.
float
static final String MAX
BINNING_DATA
.
float
static final String BINNING_DATA
byte[]
Binning data can have one or more segment.
Each segment is composed of the following JSON Keys.
JSON key | Type | Unit | Mandatory |
---|---|---|---|
"heart_rate" | float |
Beat per minute | Yes. Set this value if you save BINNING_DATA . |
"heart_rate_min" | float |
Beat per minute | Yes. Set this value if you save BINNING_DATA . |
"heart_rate_max" | float |
Beat per minute | Yes. Set this value if you save BINNING_DATA . |
"start_time" | long |
UTC millisecond | Yes. Set this value if you save BINNING_DATA . |
"end_time" | long |
UTC millisecond | Yes. Set this value if you save BINNING_DATA . |
The following example shows the JSON format for BINNING_DATA
.
{ "heart_rate":147.48181, "heart_rate_min":99.0, "heart_rate_max":124.0, "start_time":1422457096536, "end_time":1493922600000 }
Compressed JSON conversion can be:
HealthDataUtil
,
Constant Field Valuesstatic final String HEALTH_DATA_TYPE
"com.samsung.health.heart_rate"
to add permission to the manifest file.Copyright © Samsung Electronics, Co., Ltd. All rights reserved.