目录

Getting Started

Follow the steps in the following process when you develop an app.

No.

Step

Description

1

Preparations

  1. Applying for the HUAWEI ID Service: Health Service Kit uses the HUAWEI ID service and therefore, you need to apply for the HUAWEI ID service first.
  2. Applying for Health Service Kit: Apply for Health Service Kit, select the product type, and enable the read and write scopes for the corresponding data.

2

Developing your app

Following the guide, integrate Health Service Kit basic capabilities to the cloud-side app and develop desired functions based on service needs.

  1. Authentication: Your app is authorized using the authorization code based on OAuth 2.0, when accessing Health Service Kit.
  2. Canceling Authorization: To ensure app privacy and security, provide an entry for users to cancel authorization.
  3. Open Authorization in Huawei Health: You can only access the data in the Huawei Health app after the user has authorized Huawei Health to open data to Health Service Kit. (Skip this step if you do not need to access the data in the Huawei Health app.)
  4. Storing and Querying Data: This section uses the step count as an example to describe how to write and read a group of data by calling HTTP REST APIs.
  5. Subscribing to Data: The Health Service Kit cloud provides a subscription mechanism which notifies your app of user data changes in real time, ensuring that your app can always obtain the latest data. (Skip this step if you do not use the data subscription function.)

3

Applying for verification

After the app development is complete, submit an application for verification to obtain the formal scopes.

Before developing your app, you can use the Sample Code to experience how to quickly build an app with basic Health Service Kit capabilities.