SurveySamplingPackage class
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
Properties
-
dataTypes
→ List<
DataTypeMetaData> -
The list of data type this package supports.
no setterinherited
-
deviceManager
→ DeviceManager<
DeviceConfiguration< DeviceRegistration> , DeviceRegistration> -
Get the
DeviceManagerfor the device used by this package.no setterinherited - deviceType → String
-
What device type is this package using?
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- samplingSchemes → DataTypeSamplingSchemeMap
-
The default sampling schemes for all dataTypes in this package.
no setteroverride
Methods
-
create(
String type) → Probe? -
Creates a new
Probeof the specifiedtype. Note thattypeshould be one of the dataTypes that this package supports. Returns null if a probe cannot be created for thetype.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onRegister(
) → void -
Callback method when this package is being registered.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- SURVEY → const String
- Measure type for the result of a survey (RPTaskResultData).