start method
Start this controller.
If start
is true, immediately start data collection
according to the parameters specified in configure.
configure must be called before starting sampling.
Implementation
@override
Future<void> start([bool start = true]) async {
info(
'$runtimeType - Starting data sampling for study deployment: ${deployment?.studyDeploymentId}');
// if this study has not yet been deployed, do this first.
if (status.index < StudyStatus.Deployed.index) {
await tryDeployment();
await configure();
}
// ask for permissions for all measures in this deployment
if (SmartPhoneClientManager().askForPermissions) {
await askForAllPermissions();
}
super.start();
if (start) executor.start();
}