Skip to content
pubscout

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.

$ flutter pub add carp_health_package
Source repository

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.

Works with

Packages commonly used together with carp_health_package: ones it builds on, ones built on it, and its own family.