RPAppTask
An AppTask that asks the user to complete a Research Package task.
The rpTask can be a survey, a cognitive test, or any other RPTask from Research Package. Add it to a protocol with a trigger, like any other task. When triggered, it shows up as a SurveyUserTask in the AppTaskController.userTaskQueue.
Key points:
- The type decides how the app treats it, e.g. AppTask.SURVEY_TYPE or AppTask.COGNITIVE_ASSESSMENT_TYPE.
- The SurveySamplingPackage.SURVEY measure and a completed app task measure are always added to measures, so the result is collected.
- Other measures are sampled in the background while the user does the task.
For example, a PeriodicTrigger triggers the survey on a regular basis, and a RecurrentScheduledTrigger schedules a recurrent survey, e.g. every Monday at 8pm:
protocol.addTaskControl(
RecurrentScheduledTrigger(type: RecurrentType.daily, time: TimeOfDay(hour: 13)),
RPAppTask(type: AppTask.SURVEY_TYPE, name: 'WHO-5 Survey', rpTask: who5Task),
phone,
);
- Inheritance
-
- Object
- Serializable
- TaskConfiguration
- AppTask
- RPAppTask
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
RPAppTask.fromJson
RPAppTask
Properties
fromJsonFunction
The function which can convert a JSON string to an object of this type.
rpTask
getter/setter pair
The survey, cognitive test or other Research Package task to show to the user.
Methods
toJson
Return a JSON encoding of this object.