HealthService
A connected device that represents the health database on the phone: Apple Health on iOS and Google Health Connect on Android.
Add it to a protocol with StudyProtocol.addConnectedDevice and use it as the target device of tasks with HealthSamplingPackage.HEALTH measures. At runtime it is handled by a HealthServiceManager, which uses the health plugin.
On Android, this health package always uses Google Health Connect.
- Inheritance
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
HealthService.fromJson
HealthService
- String roleName = HealthService.DEFAULT_ROLE_NAME,
Create a new HealthService with a default role name, if not specified.
Constants
DEFAULT_ROLE_NAME
The default role name for a health service.
DEVICE_TYPE
The type of the health service.
Properties
fromJsonFunction
The function which can convert a JSON string to an object of this type.
Methods
toJson
Return a JSON encoding of this object.