carp_health_package
4.2.0, released 5 days ago by carp.dk
Samples health data from Apple Health and Google Health Connect for CARP Mobile Sensing.
What it does
This package provides a sampling package that pulls health data from Apple HealthKit and Google Health Connect into the CARP Mobile Sensing framework. It wraps the health plugin and exposes a HealthService device for use in CAMS protocols.
AI-written summary of version 4.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to collect health metrics such as steps, weight, heart rate or sleep stages in a CARP study.
- You are building a Flutter app that already uses carp_mobile_sensing and want to add native health data collection.
Skip it when
- You are not using CARP Mobile Sensing or Flutter, or you only need a simple health data read without a full sampling framework.
- You target platforms other than Android/iOS or do not need native health permissions.
Strengths
- Seamless integration with CARP Mobile Sensing framework.
- Supports both Apple HealthKit and Google Health Connect.
- Provides a ready-to-use HealthService device and permission handling.
Weaknesses
- Requires extensive native configuration and permissions on both platforms.
- Setup is complex and error‑prone, especially for Health Connect API level 34.
- No support for other health platforms or custom data types.
Setup
- Kind
- Flutter widgets
- Effort
- High
- Code generation
- Yes (build_runner)
- Direct dependencies
- 5
Must configure native health permissions (HealthKit for iOS, Health Connect for Android), add required permissions to AndroidManifest, enable HealthKit capability in Xcode, and follow the health plugin setup guide. No build_runner needed.
```dart
import 'package:carp_health_package/health_package.dart';
import 'package:carp_mobile_sensing/carp_mobile_sensing.dart';
SamplingPackageRegistry().register(HealthSamplingPackage());
```Alternatives
Packages that do the same job and could replace carp_health_package.
- light
Flutter plugin that streams ambient light sensor (lux) values on Android and iOS.
76Compare - launch_app_store
Flutter plugin to leave reviews and ratings in Google Play Store and Apple App Store.
71Compare - health_connector_hc_android
Android implementation of the health_connector plugin using Health Connect SDK.
75Compare - health_kit_reporter
Flutter wrapper for Apple Health through HealthKit and Swift Package Manager.
80Compare
Works with
Packages commonly used together with carp_health_package: ones it builds on, ones built on it, and its own family.
- json_annotationcarp_health_package depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- carp_serializablecarp_health_package depends on itPolymorphic JSON (de)serialization using json_serializable with type info.
- healthcarp_health_package depends on itWrapper for Apple's HealthKit and Google's Health Connect.
- carp_mobile_sensingcarp_health_package depends on itMobile sensing framework for collecting sensor and device data via configurable probes.
- research_packageSame familyA Flutter framework for obtaining informed consent, showing surveys and collecting results.
- mobility_featuresSame familyCalculates real-time mobility features like places, stops, and home stay from location data.