HealthAppTask
An AppTask that asks the user to collect their own health data.
Add it to the protocol with a trigger, for example a PeriodicTrigger, on the phone. It shows up in the user's task list, and when the user starts it, it runs as a HealthUserTask: it asks for permission to read types and then collects them once.
Key points:
- If measures has no HealthSamplingPackage.HEALTH measure, one is added for types using HealthSamplingPackage.getHealthMeasure.
- type defaults to AppTask.HEALTH_ASSESSMENT_TYPE, which the HealthUserTaskFactory turns into a HealthUserTask.
- Inheritance
-
- Object
- Serializable
- TaskConfiguration
- AppTask
- HealthAppTask
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
HealthAppTask.fromJson
HealthAppTask
Properties
fromJsonFunction
The function which can convert a JSON string to an object of this type.
types
getter/setter pair
The health data types to collect.
Only used to create the health measure when measures does not already contain one.
Methods
toJson
Return a JSON encoding of this object.