SurveyUserTask
A UserTask that shows a survey or cognitive test from an RPAppTask.
Created by SurveyUserTaskFactory and put on the AppTaskController.userTaskQueue when the RPAppTask is triggered. The app shows the widget (a SurveyPage) to the user.
Key points:
- Call onStart when the user starts the task. This resumes background sampling of the task's measures.
- On submit, adds an RPTaskResultData measurement with status SurveyStatus.submitted, pauses background sampling and marks the task done.
- On cancel, also adds the partial result (status SurveyStatus.canceled), pauses background sampling and marks the task canceled.
Constructors
SurveyUserTask
- AppTaskExecutor<
AppTask> executor
Properties
hasWidget
Does this user task has a user interface (Widget) to show to the user?
rpAppTask
The RPAppTask from which this user task originates from.
widget
The widget to be shown to the user as part of this task, if any. Note that the user interface may not be available before the onStart method has been called.
Methods
onStart
override
Callback from the app when this task is to be started.