health_package
A sampling package that collects health data from Apple Health (iOS) or Google Health Connect (Android).
It wraps the health plugin and provides one measure type, dk.cachet.carp.health, which can collect any set of HealthDataTypes. Data is collected through the HealthService connected device.
Register HealthSamplingPackage in the SamplingPackageRegistry, add a HealthService to the protocol, and collect data either in the background (a Measure from HealthSamplingPackage.getHealthMeasure) or when the user starts a HealthAppTask. Each health data point becomes a HealthData measurement. The health plugin is re-exported.
Classes
DummyHealthData— A minimal health Data type that holds only a uuid.HealthAppTask— An AppTask that asks the user to collect their own health data.HealthData— One health data point from Apple Health or Google Health Connect.HealthProbe— Collects health data from Apple Health or Google Health Connect.HealthSamplingConfiguration— The sampling configuration of the HealthSamplingPackage.HEALTH measure.HealthSamplingPackage— The sampling package for health data from Apple Health or Google Health Connect.HealthService— A connected device that represents the health database on the phone: Apple Health on iOS and Google Health Connect on Android.HealthServiceManager— The DeviceManager for the HealthService.HealthUserTask— A UserTask without UI that collects health data when the user starts it.HealthUserTaskFactory— A UserTaskFactory that creates a HealthUserTask for each AppTask of type AppTask.HEALTH_ASSESSMENT_TYPE.
Enums
DasesHealthDataType— Diet, alcohol, smoking, exercise and sleep (DASES) data types.HealthPlatform— The health platform a HealthData point comes from.
Constants
dasesDataTypeToUnit
The HealthDataUnit of each DasesHealthDataType.