com.samsung.android.sdk.healthdata

Interface HealthConstants.Exercise

    • Field Detail

      • EXERCISE_CUSTOM_TYPE

        static final String EXERCISE_CUSTOM_TYPE
        Custom exercise type. Define its value as FQDN, e.g. "com.yourcompany.exercise.type.exercise_name".

        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.

        • Optional
        • Type: String
        • Value length: 1 ~ 255

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • DISTANCE

        static final String DISTANCE
        Distance covered during the exercise in meters.

        • Optional
        • Type: float
        • Value range: 0 ~ 2000000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • CALORIE

        static final String CALORIE
        Burned calorie during the activity in kilocalories.

        • Mandatory
        • Type: float
        • Value range: 0 ~ 1000000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • DURATION

        static final String DURATION
        Duration of this exercise in milliseconds.

        • Mandatory
        • Type: long
        • Value range: 0 ~ 86400000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • ALTITUDE_GAIN

        static final String ALTITUDE_GAIN
        Increased altitude during the activity in meters.

        • Optional
        • Type: float
        • Value range: 0 ~ 10000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • ALTITUDE_LOSS

        static final String ALTITUDE_LOSS
        Decreased altitude during the activity in meters.

        • Optional
        • Type: float
        • Value range: 0 ~ 10000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • COUNT

        static final String COUNT
        Count of a repetitive action, such as the revolution count of the bicycle pedal or striding count of a runner or walker.

        • Optional
        • Type: int
        • Value range: 0 ~ 1000000

        Since:
        1.0.0
        See Also:
        COUNT_TYPE, Constant Field Values
      • COUNT_TYPE_STRIDE

        static final int COUNT_TYPE_STRIDE
        Stride or step cadence type.
        Its constant value is 30001.
        Since:
        1.0.0
        See Also:
        COUNT_TYPE, Constant Field Values
      • COUNT_TYPE_STROKE

        static final int COUNT_TYPE_STROKE
        Stroke cadence type.
        Its constant value is 30002.
        Since:
        1.0.0
        See Also:
        COUNT_TYPE, Constant Field Values
      • COUNT_TYPE_SWING

        static final int COUNT_TYPE_SWING
        Swing cadence type.
        Its constant value is 30003.
        Since:
        1.0.0
        See Also:
        COUNT_TYPE, Constant Field Values
      • COUNT_TYPE_REPETITION

        static final int COUNT_TYPE_REPETITION
        General repetition type.
        Its constant value is 30004.
        Since:
        1.3.0
        See Also:
        COUNT_TYPE, Constant Field Values
      • MAX_SPEED

        static final String MAX_SPEED
        Maximum speed in meters per second.

        • Optional
        • Type: float
        • Value range: 0 ~ 140

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • MEAN_SPEED

        static final String MEAN_SPEED
        Mean speed in meters per second.

        • Optional
        • Type: float
        • Value range: 0 ~ 140

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • MAX_CALORICBURN_RATE

        static final String MAX_CALORICBURN_RATE
        Maximum rate of burned calories in kilocalories per hour.

        • Optional
        • Type: float
        • Value range: 0 ~ 1000000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • MEAN_CALORICBURN_RATE

        static final String MEAN_CALORICBURN_RATE
        Mean rate of burned calories in kilocalories per hour.

        • Optional
        • Type: float
        • Value range: 0 ~ 1000000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • MAX_CADENCE

        static final String MAX_CADENCE
        Maximum cadence rate per minute.
        E.g. the cadence indicates steps per minute for running exercise.

        • Optional
        • Type: float
        • Value range: 0 ~ 500000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • MEAN_CADENCE

        static final String MEAN_CADENCE
        Mean cadence rate per minute.
        E.g. the cadence indicates steps per minute for running exercise.

        • Optional
        • Type: float
        • Value range: 0 ~ 500000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • MAX_HEART_RATE

        static final String MAX_HEART_RATE
        Maximum heart rate per minute.

        • Optional
        • Type: float
        • Value range: 0 ~ 300

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • MEAN_HEART_RATE

        static final String MEAN_HEART_RATE
        Mean heart rate per minute.

        • Optional
        • Type: float
        • Value range: 0 ~ 300

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • MIN_HEART_RATE

        static final String MIN_HEART_RATE
        Minimum heart rate per minute.

        • Optional
        • Type: float
        • Value range: 0 ~ 300

        Since:
        1.2.0
        See Also:
        Constant Field Values
      • MAX_ALTITUDE

        static final String MAX_ALTITUDE
        Maximum altitude in meters.

        • Optional
        • Type: float
        • Value range: -1000 ~ 10000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • MIN_ALTITUDE

        static final String MIN_ALTITUDE
        Minimum altitude in meters.

        • Optional
        • Type: float
        • Value range: -1000 ~ 10000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • INCLINE_DISTANCE

        static final String INCLINE_DISTANCE
        Uphill distance during the activity in meters.

        • Optional
        • Type: float
        • Value range: 0 ~ 1000000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • DECLINE_DISTANCE

        static final String DECLINE_DISTANCE
        Downhill distance during the activity in meters.

        • Optional
        • Type: float
        • Value range: 0 ~ 1000000

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • MAX_POWER

        static final String MAX_POWER
        Maximum power in watts.

        • Optional
        • Type: float
        • Value range: 0 ~ 999

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • MEAN_POWER

        static final String MEAN_POWER
        Mean power in watts.

        • Optional
        • Type: float
        • Value range: 0 ~ 999

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • MEAN_RPM

        static final String MEAN_RPM
        Mean RPM (Revolutions Per Minute).

        • Optional
        • Type: float
        • Value range: 0 ~ 100000

        Since:
        1.2.1
        See Also:
        Constant Field Values
      • MAX_RPM

        static final String MAX_RPM
        Max RPM (Revolutions Per Minute).

        • Optional
        • Type: float
        • Value range: 0 ~ 100000

        Since:
        1.3.0
        See Also:
        Constant Field Values
      • LIVE_DATA

        static final String LIVE_DATA
        Live data (e.g. heart rate, speed, power, and so on) during exercise which is formatted with JSON and compressed data.

        • Optional
        • Type: byte[]
        • Maximum data size: 1000 KB

        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.

        JSON key Type Unit Mandatory
        "start_time" long UTC millisecond Recommended.
        Set this value if you save LIVE_DATA.
        "heart_rate" float Beat per minute Recommended.
        Set one or more values if you save LIVE_DATA.
        "cadence" float Rate per minute
        "count" int -
        "power" float Watt
        "speed" float Meter per second
        "distance" float Meter

        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
           }

        Especially, each segment's "count" and "distance" in live data are accumulated values to the each segment's "start_time"unlike other values such as "heart_rate" and "cadence" that indicate the measured value at the point of each segment's "start_time".

        Compressed JSON conversion can be:

        Since:
        1.0.0
        See Also:
        HealthDataUtil, Constant Field Values
      • LOCATION_DATA

        static final String LOCATION_DATA
        Location (trajectory) data during exercise which is formatted with JSON and compressed data.
        It follows WGS 84.

        • Optional
        • Type: byte[]
        • Maximum data size: 1000 KB

        Location data can have one or more segment.
        Each segment is composed of the following JSON Keys.

        JSON key Type Mandatory
        "start_time" long Recommended,
        Set this value if you save LOCATION_DATA.
        "latitude" float Recommended,
        Set this value if you save LOCATION_DATA.
        "longitude" float Recommended,
        Set this value if you save LOCATION_DATA.
        "altitude" float No
        "accuracy" float No

        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
           }

        Compressed JSON conversion can be:

        Since:
        1.0.0
        See Also:
        HealthDataUtil, Constant Field Values
      • VO2_MAX

        static final String VO2_MAX
        Maximal oxygen consumption during exercise.

        • Optional
        • Type: float
        • Value range: 0 ~ 100

        Since:
        1.5.0
        See Also:
        Constant Field Values
      • COMMENT

        static final String COMMENT
        Comment for data.

        • Optional
        • Type: String
        • Value length: 0 ~ 255

        Since:
        1.0.0
        See Also:
        Constant Field Values
      • ADDITIONAL

        static final String ADDITIONAL
        Additional info to express exercise's details.
        It is formatted with JSON and compressed data. It's different for each exercise kind.

        Compressed JSON conversion can be:

        Swimming's Additional Info

        Swimming's detailed information is defined with the following JSON keys.

        JSON key Type Unit Mandatory Remarks
        "pool_length" int - Yes 20 | 50 | ...
        "pool_length_unit" String - Yes One of the following value:
        • "meter"
        • "yard"
        "total_distance" float meter Yes
        "total_duration" int millisecond Yes
        "lengths" Array - No Array of length

        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.

        JSON key Type Unit Mandatory Description
        "duration" int millisecond Yes Duration value of this length
        "stroke_count" int - Yes Stroke count value of this length
        "stroke_type" String - Yes Stroke type value of this length
        One of the following value:
        • "Freestyle"
        • "Butterfly"
        • "Backstroke"
        • "Breaststroke"
        • "Mixed"
        "interval" int - Yes Interval value.
        It starts from 1 and increments by 1.

        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"
                   }
               ]
           }

        Since:
        1.3.0
        See Also:
        Constant Field Values
      • HEALTH_DATA_TYPE

        static final String HEALTH_DATA_TYPE
        Data type name for exercise.
        Use "com.samsung.health.exercise" to add permission to the manifest file.
        Since:
        1.0.0
        See Also:
        Constant Field Values