SurveySamplingPackage
The sampling package for surveys and cognitive tests filled in by the user.
Surveys are built with the research_package and added to a protocol as an RPAppTask. Register the package before you deploy such a protocol:
SamplingPackageRegistry().register(SurveySamplingPackage());
Key points:
- The SurveyUserTask collects the data, not a probe. SurveyProbe is a no-op placeholder for the SURVEY measure.
- On registration, initializes Research Package and Cognition Package and registers SurveyUserTaskFactory with the AppTaskController.
- Registers RPAppTask and RPTaskResultData for JSON deserialization.
- Inheritance
-
- Object
- SamplingPackage
- SmartphoneSamplingPackage
- SurveySamplingPackage
Constructors
SurveySamplingPackage
Constants
SURVEY
Measure type for the result of a survey (RPTaskResultData).
- One-time measure.
- Uses the Smartphone primary device.
- Added automatically to the measures of every RPAppTask.
Properties
samplingSchemes
override
The default sampling schemes for all dataTypes in this package.
All sampling packages should defined a DataTypeSamplingScheme for each data type.
Methods
create
Creates a new Probe of the specified type. Note that type should be one of the dataTypes that this package supports. Returns null if a probe cannot be created for the type.
onRegister
override
Callback method when this package is being registered.