HUAWEI Health Kit is an open platform under HMS targeted at the fitness & health field, providing fitness and health data to facilitate developers in making their own apps.
HUAWEI Health Core is the terminal-side implementation of the HUAWEI Health Kit open platform and is dynamically loaded by HMS Core when necessary.
HUAWEI Health Kit Cloud is the cloud-side implementation of the HUAWEI Health Kit open platform.
The HUAWEI Health SDK is a JAR package for third-party Apps to connect with the HUAWEI Health Core platform.

This codelab provides a basic third-party App development example. The developer only needs to complete the corresponding code fragment to achieve the function of real-time step counting. This function displays the real-time step count curve, step frequency, total number of steps, and calories burnt on the UI.

Hardware Requirements

Software Requirements

What You Need to Be Familiar with

1.Run the initial project (download the original framework code):

2.Add the login code.

3.Requests user authorization.

4.Register a listener for real-time data.

5.Read and process the real-time data from the sensor.

6.Unregister the listener.

7.Switch to your own package name


9.Try the implementation on a mobile phone:

The following figure shows the implementation.

Well done. You have successfully completed this codelab and learned:

  1. How to connect to the openness capabilities of HUAWEI Health Core.
  2. How to read data from the sensor in real time.

For more information, please click the following links:
Related document
You can download the sample code used in this codelab from the following address:

Download source code

Code copied