English | 中文
HUAWEI Health is an open service for sports & health capabilities provided by Huawei. Developers can access the Huawei Health Platform and obtain sports & health data by integrating HUAWEI Health.
Health demo code encapsulates APIs of the HUAWEI Health Kit. It provides demo programs for your reference or usage.
The following describes the functions of Health Kit:
Login and Authorization
This function applies to login the account and enable the authorization.
Android APIs code location: \app\src\main\java\com\huawei\demo\health\auth\HealthKitAuthActivity.kt
Cancel Scope
This function applies to cancel account authorization.
Android APIs code location: \app\src\main\java\com\huawei\demo\health\HealthKitMainActivity.kt
Operate health and sport data
The function has ability to add/delete/update/query the health and sport data.
Code location: \app\src\main\java\com\huawei\demo\health\HealthKitDataControllerActivity.kt
Auto-record the step count
This function can enable and disable the automatically record method for the step count.
Code location: \app\src\main\java\com\huawei\demo\health\HealthKitAutoRecorderControllerActivity.kt
Operate Activity Record
This function can create and manage a single sport or activity.
Code location: \app\src\main\java\com\huawei\demo\health\HealthKitActivityRecordControllerActivity.kt
Operate DataType and Records
This function can add/read DataType and cancel All Records.
Code location: \app\src\main\java\com\huawei\demo\health\HealthKitSettingControllerActivity.kt
Operate Health Record
This function can add/read/update a health record. Currently, the data types of the tachycardia bradycardia are supported.
Code location: \app\src\main\java\com\huawei\demo\health\HealthKitHealthRecordControllerActivity.kt
Before using Health demo code, check whether the IDE environment has been installed.
To use functions provided by packages in examples, you need to set parameters as following:
If you want to evaluate more about HMS Core, r/HMSCore on Reddit is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.
If you have questions about how to use HMS samples, try the following options:
huawei-mobile-services
.If you run into a bug in our samples, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.
Health kit demo is licensed under the Apache License, version 2.0.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。