All Projects → HMS-Core → hms-health-demo-java

HMS-Core / hms-health-demo-java

Licence: Apache-2.0 license
HMS Health demo code provides demo programs for your reference or usage. Developers can access the Huawei Health Platform and obtain sports & health data by integrating HUAWEI Health.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to hms-health-demo-java

hms-health-demo-kotlin
HMS Health demo code provides demo programs for your reference or usage. Developers can access the Huawei Health Platform and obtain sports & health data by integrating HUAWEI Health.
Stars: ✭ 21 (-43.24%)
Mutual labels:  sports, fitness, health, health-data, huawei, hms
Hitrava
Convert your Huawei Health sport activities and import them in Strava.
Stars: ✭ 156 (+321.62%)
Mutual labels:  sports, fitness, health
Health Blockchain
A blockchain for fitness data demo
Stars: ✭ 31 (-16.22%)
Mutual labels:  fitness, health
Tapiriik
tapiriik keeps your fitness in sync
Stars: ✭ 1,604 (+4235.14%)
Mutual labels:  fitness, health
hms-cordova-plugin
This repo contains all of Cordova HMS plugins.
Stars: ✭ 78 (+110.81%)
Mutual labels:  huawei, hms
humanapi
The easiest way to integrate health data from anywhere - https://www.humanapi.co
Stars: ✭ 21 (-43.24%)
Mutual labels:  health, health-data
rn-fitness-tracker
React Native module to interact with Google Fit and Apple HealthKit.
Stars: ✭ 58 (+56.76%)
Mutual labels:  fitness, health
hms-toolkit-convertor
Convertor is a code conversion tool supporting Java and Kotlin projects. It helps developers to automatically convert GMS APIs called by apps into corresponding HMS APIs, implementing quick conversion and HMS integration.
Stars: ✭ 29 (-21.62%)
Mutual labels:  huawei, hms
hms-audio-demo
HMS audio android sample code encapsulates APIs of the HUAWEI Audio Kit, which focuses on audio playback, audio effects and audio data.
Stars: ✭ 20 (-45.95%)
Mutual labels:  huawei, hms
hms-push-serverdemo-java
Java sample code encapsulates APIs of the HUAWEI Push Kit server. It provides many sample programs for your reference or usage.
Stars: ✭ 39 (+5.41%)
Mutual labels:  huawei, hms
hms-audio-editor-demo
HUAWEI Audio Kit provides a wide range of audio editing capabilities, including auido import/export/editing/extracting and format conversion. This sample code describes how to integrate the Audio Editor Kit SDK.
Stars: ✭ 24 (-35.14%)
Mutual labels:  huawei, hms
hms-image-vision-java
This sample code is to guide the developer how to integrate the Image Vision Sub-service of the Image Kit, calling the image filter function. This sub-service provides 24 unique filter effects to enhance the artistic conception and artistic sense of the images.
Stars: ✭ 22 (-40.54%)
Mutual labels:  huawei, hms
from-gms-to-hms
Complete guide to adding support for Huawei's mobile services and distribution platform into your apps that are already published on Google Play.
Stars: ✭ 30 (-18.92%)
Mutual labels:  huawei, hms
react-native-health
A React Native package to interact with Apple HealthKit
Stars: ✭ 348 (+840.54%)
Mutual labels:  fitness, health
hms-ecommerce-demo
Build a shopping app by HMS Core kits which shows how to use the HMS Core solution in E-Commerce industry.
Stars: ✭ 70 (+89.19%)
Mutual labels:  huawei, hms
hms-FIDO-demo-java
HMS FIDO demo, including fido2 demo, bioauthn demo and bioauthn-androidx demo.
Stars: ✭ 17 (-54.05%)
Mutual labels:  huawei, hms
hms-scene-demo
HMS Scene kit demo provides an example of integrating HUAWEI Scene Kit with an app. A 3D graphics rendering engine performs more with less. User-friendly rendering APIs for games, AR & VR apps, and other apps bring your users a stunning visual experience.
Stars: ✭ 18 (-51.35%)
Mutual labels:  huawei, hms
hms-scene-RTcore-demo
This demo provides examples of how to use RTCore APIs, including using them to create reflection effects and draw triangles.
Stars: ✭ 13 (-64.86%)
Mutual labels:  huawei, hms
Choochoo
Training Diary
Stars: ✭ 186 (+402.7%)
Mutual labels:  sports, fitness
hms-push-serverdemo-php
PHP sample code encapsulates APIs of the HUAWEI Push Kit server.It provides many sample PHP programs about quick access to HUAWEI Push Kit for your reference or usage.
Stars: ✭ 21 (-43.24%)
Mutual labels:  huawei, hms

HMS Healthkit Demo

English | 中文

Item

Introduction

HUAWEI Health Kit is the fitness and health capability open service that constructs a fitness and health ecosystem data platform (hereinafter referred to as the ecosystem data platform). As the manager of users' fitness and health data, the ecosystem data platform complies with Huawei's cyber security and user privacy protection specifications to ensure the security, integrity, and accuracy of user data. You can access Huawei's ecosystem data platform by integrating Health Kit. The ecosystem data platform provides APIs for you to write user fitness and health data to the ecosystem data platform, as well as various data query APIs for you to obtain the fitness and health data imported by users across platforms and apps. The ecosystem data platform manages only the fitness and health data authorized by users and provides abundant cross-platform and cross-app query APIs.

This project is the Android sample code of Health Kit. In the sample code, Android APIs of the ecosystem data platform are called to write the user's fitness and health data and read the data written by the user to the platform. The sample code provides only simple calling examples of the Android APIs for your reference.

HUAWEI Health Kit provides the following functions: (1) Login and authorization Allows users to log in to their accounts, and obtains the read and write permissions on fitness and health data. The Android APIs code is saved in \app\src\main\java\com\huawei\demo\health\auth\HealthKitAuthActivity.java.

(2) Authorization cancellation Allows users to cancel account authorization. The Android APIs code is saved in \app\src\main\java\com\huawei\demo\health\auth\HealthKitMainActivity.java.

(3) Fitness and health data management Supports adding, deleting, updating, and querying authorized health and fitness data. The code is stored in \app\src\main\java\com\huawei\demo\health\HealthKitDataControllerActivity.java.

(4) Automatic record of step counts on the user device Allows you to add a listener on the pedometer and pass the sensor data in real time as the authorized fitness and health data to your app, under user authorization. The code is stored in \app\src\main\java\com\huawei\demo\health\HealthKitAutoRecorderControllerActivity.java.

(5) Activity record dataset operations Allows you to write the activity records and fitness and health datasets authorized by the user. For example, a running activity includes a start time, an end time, and exercise data (track, speed, and heart rate). With user authorization, an activity (such as running) can be created, during which the user's authorized fitness and health data is written to the ecosystem data platform, until the activity ends. With user authorization, you can manage the user's fitness data, including querying, deleting, and modifying the data. The code is stored in \app\src\main\java\com\huawei\demo\health\HealthKitActivityRecordControllerActivity.java.

(6) Custom data type Allows you to create customized data types and use them to write the user's fitness and health data to the ecosystem data platform, under user authorization. You can also cancel a listener added to the ecosystem data platform. The code is stored in \app\src\main\java\com\huawei\demo\health\HealthKitSettingControllerActivity.java.

(7) Health record dataset operations Allows you to add, modify, and query health records under user authorization. Currently, only the tachycardia and bradycardia data types are supported. The code is stored in \app\src\main\java\com\huawei\demo\health\HealthKitHealthRecordControllerActivity.java.

Preparations

Before using the sample code, check whether Integrated Development Environment (IDE) has been installed.

  1. Decompress the sample code package. . Copy the code package to the IDE directory and import the code package to the IDE.
  2. Generate a signing certificate fingerprint, add the certificate file to your project, and add the signature configuration to the build.gradle file. For details, refer to Development Guide. . Click Sync Project with Gradle Files to build the IDE.

Before using the functions in the sample code package, configure the following parameters:

  1. HUAWEI ID: The Health app needs to verify whether you have the permission to read and write health data. . HMS SDK Maven address:
    • Go to the project build.gradle > all projects > repositories, configure the Maven address of HMS SDK: maven {url 'http://developer.huawei.com/repo/'}.
    • Go to the project build.gradle > buildscript > dependencies, configure the Maven address of HMS SDK: maven {url 'http://developer.huawei.com/repo/'}. Build dependencies: Add build dependencies implementation 'com.huawei.hms:health:{version}' to the build.gradle file at the app level. AppId: Add the app ID generated when creating the app on HUAWEI Developers to the AndroidManifest.xml file of the app.

Get familiar with environment requirements.

  • Android Studio 3.6.1 or later.
  • Java SDK 1.8 or later.
  • A phone running a version later than Android 6.0 (API level: 23) or HarmonyOS. HMS Core (APK) 4.2.0.300 or later has been installed on the phone. To read data from the Health app, HMS Core (APK) 5.0.4.300 or later should be installed and also HUAWEI Health app of version 11.0.0.512 or later has been installed.

Operation Result

Technical Support

You can visit the Reddit community to obtain the latest information about HMS Core and communicate with other developers.

If you have any questions about the sample code, try the following:

  • Visit Stack Overflow. Submit your questions, and tag them with huawei-mobile-services. Huawei experts will answer your questions.
  • Visit the HMS Core section in the Huawei Developer Forum and communicate with other developers.

If you encounter any issues when using the sample code, submit your issues or submit a pull request.

License

The sample code is licensed under Apache License 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].