public static interface HealthConstants.Exercise extends HealthConstants.SessionMeasurement
Properties of the following extending interfaces are available for this data type.
HealthConstants.Common
HealthConstants.SessionMeasurement
If the Samsung Health's exercise data has the same START_TIME and END_TIME, it means the user didn't select the "PAUSE" or "STOP" button yet on Samsung Health.
START_TIME
END_TIME
static String
ADDITIONAL
ALTITUDE_GAIN
ALTITUDE_LOSS
CALORIE
COMMENT
COUNT
COUNT_TYPE
static int
COUNT_TYPE_REPETITION
COUNT_TYPE_STRIDE
COUNT_TYPE_STROKE
COUNT_TYPE_SWING
DECLINE_DISTANCE
DISTANCE
DURATION
EXERCISE_CUSTOM_TYPE
EXERCISE_TYPE
HEALTH_DATA_TYPE
INCLINE_DISTANCE
LIVE_DATA
LOCATION_DATA
MAX_ALTITUDE
MAX_CADENCE
MAX_CALORICBURN_RATE
MAX_HEART_RATE
MAX_POWER
MAX_RPM
MAX_SPEED
MEAN_CADENCE
MEAN_CALORICBURN_RATE
MEAN_HEART_RATE
MEAN_POWER
MEAN_RPM
MEAN_SPEED
MIN_ALTITUDE
MIN_HEART_RATE
VO2_MAX
END_TIME, START_TIME, TIME_OFFSET
CREATE_TIME, CUSTOM, DEVICE_UUID, PACKAGE_NAME, UPDATE_TIME, UUID
static final String EXERCISE_TYPE
If you cannot find a proper exercise type in predefined types, set the value as 0 and set EXERCISE_CUSTOM_TYPE instead of it.
0
int
static final String EXERCISE_CUSTOM_TYPE
This property has to be used only when you cannot find a required exercise type in predefined types. If this custom type is used, set the value of EXERCISE_TYPE as 0. Your custom health data is inserted to the health data store but it is not shown in Samsung Health.
String
static final String DISTANCE
float
static final String CALORIE
static final String DURATION
long
static final String ALTITUDE_GAIN
static final String ALTITUDE_LOSS
static final String COUNT
static final String COUNT_TYPE
static final int COUNT_TYPE_STRIDE
30001
static final int COUNT_TYPE_STROKE
30002
static final int COUNT_TYPE_SWING
30003
static final int COUNT_TYPE_REPETITION
30004
static final String MAX_SPEED
static final String MEAN_SPEED
static final String MAX_CALORICBURN_RATE
static final String MEAN_CALORICBURN_RATE
static final String MAX_CADENCE
static final String MEAN_CADENCE
static final String MAX_HEART_RATE
static final String MEAN_HEART_RATE
static final String MIN_HEART_RATE
static final String MAX_ALTITUDE
static final String MIN_ALTITUDE
static final String INCLINE_DISTANCE
static final String DECLINE_DISTANCE
static final String MAX_POWER
static final String MEAN_POWER
static final String MEAN_RPM
static final String MAX_RPM
static final String LIVE_DATA
byte[]
Live data can have one or more segments. E.g. Samsung Health starts the exercise data record when the user starts a specified exercise. It makes several segments to live data for each specific period. When the user tabs the 'stop' button finally it finishes the exercise data record.
Each segment is composed of the following JSON keys.
The following example shows the JSON format for LIVE_DATA.
{ "start_time":1422457096536, "heart_rate":147.48181, "cadence":95.84712, "count":83, "power":99.50436, "speed":11.061617, "distance":250 }
count
distance
start_time
heart_rate
cadence
Compressed JSON conversion can be:
HealthDataUtil
static final String LOCATION_DATA
Location data can have one or more segment. Each segment is composed of the following JSON Keys.
The following example shows the JSON format for LOCATION_DATA
{ "start_time":1422457096536, "latitude":2.7413864, "longitude":60.37224, "altitude":39.0, "accuracy":0.0 }
static final String VO2_MAX
static final String COMMENT
static final String ADDITIONAL
Swimming's detailed information is defined with the following JSON keys.
Array
A length is the distance from one end of a swimming pool to the other. Each length's detailed information is defined with the following JSON keys.
See swimming data's example additional info.
{ "pool_length":25, "pool_length_unit":"meter", "total_distance":125, "total_duration":247000, "lengths":[ { "duration":49000, "interval":1, "stroke_count":20, "stroke_type":"Butterfly" }, { "duration":42000, "interval":1, "stroke_count":21, "stroke_type":"Backstroke" }, { "duration":51000, "interval":1, "stroke_count":26, "stroke_type":"Breaststroke" }, { "duration":52000, "interval":2, "stroke_count":27, "stroke_type":"Freestyle" }, { "duration":53000, "interval":2, "stroke_count":29, "stroke_type":"Mixed" } ] }
static final String HEALTH_DATA_TYPE
"com.samsung.health.exercise"