huawei_health 6.17.0+300 copy "huawei_health: ^6.17.0+300" to clipboard
huawei_health: ^6.17.0+300 copied to clipboard

PlatformAndroid

Health Kit provides a data platform with fitness and health open capabilities, so that developers can build related apps and services based on a multitude of data types.

Huawei Health Kit Flutter Plugin


HUAWEI Health Kit (Health Kit for short) allows ecosystem apps to access fitness and health data of users based on their HUAWEI ID and authorization. For consumers, Health Kit provides a mechanism for fitness and health data storage and sharing based on flexible authorization. For developers and partners, Health Kit provides a data platform and fitness and health open capabilities, so that they can build related apps and services based on a multitude of data types. Health Kit connects the hardware devices and ecosystem apps to provide consumers with health care, workout guidance, and ultimate service experience.

This plugin enables communication between Huawei Health Kit SDK and Flutter platform. It exposes all functionality provided by Huawei Health Kit SDK.

Learn More

Installation #

Please see pub.dev and AppGallery Connect Configuration.

AOSP 16 (Android 16) migration #

This plugin release includes compatibility updates for newer Android versions:

  • Auto-recorder background service uses android:foregroundServiceType="dataSync" and immutable PendingIntent for the foreground notification.
  • Broadcast receivers are registered with RECEIVER_NOT_EXPORTED on API 33+ (Android 13 and later)

Integrating apps should declare the permissions their features need ( for example FOREGROUND_SERVICE / ``FOREGROUND_SERVICE_DATA_SYNC` when using auto-recorder) in the host app manifes.

Release builds (ProGuard R8) #

If readDailySummationList or readTodaySummationList fails in release with a Gson TypeToken error, the plugin ships consumerProguardFiles with keep rules for HiHealth and Gson. You can add the same rules to your app's proguard-rules.pro if needed (see the example app).

Custom Data Type (addDataType / readDataType) #

Custom data type names must be prefixed with your app's package name (same as applicationId in AppGallery Connect and agconnect-service.json). A mismatch causes HiHealth error 50002.

Documentation #

Questions or Issues #

If you have questions about how to use HMS samples, try the following options:

  • Stack Overflow is the best place for any programming questions. Be sure to tag your question with huawei-mobile-services.
  • Github is the official repository for these plugins, You can open an issue or submit your ideas.
  • Huawei Developer Forum HMS Core Module is great for general questions, or seeking recommendations and opinions.
  • Huawei Developer Docs is place to official documentation for all HMS Core Kits, you can find detailed documentations in there.

If you run into a bug in our samples, please submit an issue to the GitHub repository.

License #

Huawei Push Kit Flutter Plugin is licensed under Apache 2.0 license

26
likes
160
points
16
downloads

Documentation

API reference

Publisher

verified publisherdeveloper.huawei.com

Weekly Downloads

Health Kit provides a data platform with fitness and health open capabilities, so that developers can build related apps and services based on a multitude of data types.

Homepage
Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on huawei_health

Packages that implement huawei_health