Skip to content

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:

Inheritance

Constructors

SurveySamplingPackage

SurveySamplingPackage()

Constants

SURVEY

String const 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

DataTypeSamplingSchemeMap get 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

Probe? create(
  1. String type
)
override

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

void onRegister()
override

Callback method when this package is being registered.