目录

Overview

Health Service Kit provides the following health and fitness data types:

Atomic Sampling Data

Health Service Kit provides the following public sampling data types in the com.huawei namespace:

Sampling points are classified into the following types:

These two types of data are available for most sampling data types.

[h2]Atomic Sampling Detailed Data Types

A data sampling point consists of the value of the data type field and the timestamp information. It indicates data obtained instantaneously. Any raw detailed data collected by a data collector (such as a smart band) falls into the atomic sampling detailed data type.

[h2]Atomic Sampling Statistical Data Types

A data sampling point consists of the value of the data type field, the timestamp information, and a time range. It indicates data obtained within a time range.

[h2]Custom Data Types

In addition to the preceding atomic sampling detailed and statistical data types, Health Service Kit also supports custom sampling data types.

However, a custom sampling data type cannot use the namespace of Health Service Kit, that is, com.huawei. If the package name starts with com.huawei, the custom data type will conflict with the existing data types of Huawei, and therefore can't be created.

A custom data type must start with the app package name.

Creating custom data types

  1. Create a custom data type by calling SettingController.addDataType(DataTypeAddOptions options).
  2. Read the custom data type you have created by calling SettingController.readDataType(String dataTypeName).

For details, please refer to SettingController.

Exercise Record Data

Detailed data of a workout, like a run (HiHealthActivities.RUNNING) or a jump rope session, that lasts for a certain period of time. Consists of workout type, app and device information, start and end times, exercise record characteristics, associated atomic sampling statistical data, and associated atomic sampling detailed data.

For details about exercise record data and each workout type, please refer to Exercise Record Data.

Health Record Data

Data of a health record, like a sleep record (HealthDataTypes.DT_HEALTH_RECORD_SLEEP) or ECG measurement record, that lasts for a certain period of time. Consists of health record type, data collector (app and device information), start and end times, health record characteristics, associated atomic sampling statistical data, and associated atomic sampling detailed data.

For details about health record data and each type of health record, please refer to Sleep Records.

Data Openness of Wearables and Huawei Health

You can use the open capabilities of Health Service Kit to obtain health and fitness data generated by Huawei smart wearables and the Huawei Health app.

For REST integration, please refer to Data Openness of Wearables and Huawei Health.

Restrictions:

[h2]Open Atomic Sampling Data Types

The table below lists the types of raw data that your app can obtain from the Huawei Health app using SampleSet. Such data is uploaded by smart wearables to Huawei Health.

Category

Description

Data Type

Remarks

Daily activity

Step count

DT_CONTINUOUS_STEPS_DELTA

Mobile phones, watches, and bands

Distance

DT_CONTINUOUS_DISTANCE_DELTA

Mobile phones, watches, and bands

Calories burned

DT_CONTINUOUS_CALORIES_BURNT

Mobile phones, watches, and bands

Moderate to high intensity

DT_CONTINUOUS_EXERCISE_INTENSITY_V2

Mobile phones, watches, and bands

Altitude

DT_INSTANTANEOUS_ALTITUDE

Selected watches and bands

Health data

Height

DT_INSTANTANEOUS_HEIGHT

Mobile phones

Weight

DT_INSTANTANEOUS_BODY_WEIGHT

Mobile phones, and Huawei and other compatible body fat scales (ecosystem devices)

Heart rate

DT_INSTANTANEOUS_HEART_RATE

Watches and bands

Resting heart rate

DT_INSTANTANEOUS_RESTING_HEART_RATE

Watches and bands

Sleep status

DT_CONTINUOUS_SLEEP

Watches and bands

SpO2

DT_INSTANTANEOUS_SPO2

Selected watches and bands

Blood glucose

DT_INSTANTANEOUS_BLOOD_GLUCOSE

Third-party blood glucose meters (ecosystem devices)

Blood pressure

DT_INSTANTANEOUS_BLOOD_PRESSURE

Blood pressure watches (WATCH D) and ecosystem blood pressure monitors

Stress

DT_INSTANTANEOUS_STRESS

Watches and high-end bands

Body temperature

DT_INSTANTANEOUS_BODY_TEMPERATURE

Selected watches

Skin temperature

DT_INSTANTANEOUS_SKIN_TEMPERATURE

Selected watches

Maximum oxygen uptake

DT_VO2MAX

Selected professional watches and bands

[h2]Open Exercise Record Data Types

You can obtain exercise record data using ActivityRecord from smart wearables or the Huawei Health app. For details, please refer to Exercise Record Data.

[h2]Open Health Record Data Types

You can obtain health measurement record data using HealthRecord from smart wearables or the Huawei Health app. For details, please refer to Sleep Records.

[h2]Data Query Timeliness

Due to reasons such as power consumption, the data in the Huawei Health app cannot be uploaded to the cloud in real time. For details, please refer to the data query timeliness of each data type.

  • The delay of real-time data openness may vary depending on whether the screen is kept on and whether the app is allowed to run in the background. (For non-Huawei phones, users need to manually set whether to allow the app to run in the background.)
  • Users can open the Huawei Health app and manually synchronize data to ensure real-time data openness.