SmartphoneDeploymentController class Null safety

A SmartphoneDeploymentController controls the execution of a SmartphoneDeployment.



Create a new SmartphoneDeploymentController to control the runtime behavior of a study deployment.


data Stream<DataPoint>
The stream of all sampled data points. [...]
dataEndPoint DataEndPoint?
The configuration of the data endpoint, i.e. how data is saved or uploaded.
dataManager DataManager?
The data manager responsible for handling the data collected by this controller.
deployment MasterDeviceDeployment?
The MasterDeviceDeployment for this study runtime.
read / write, inherited
deploymentService DeploymentService?
The deployment service to use to retrieve and manage the study deployment with studyDeploymentId. This deployment service should have the deployment with studyDeploymentId available.
read / write, inherited
deploymentStatus StudyDeploymentStatus
The latest known deployment status.
read / write, inherited
device MasterDeviceDescriptor?
The description of the device this runtime is intended for within the deployment identified by studyDeploymentId.
read / write, inherited
deviceRegistry DeviceRegistry
The device factory to handle the devices used in this study deployment.
read / write, inherited
deviceRoleName String?
The device role name.
read-only, inherited
executor StudyDeploymentExecutor?
The executor executing this masterDeployment.
hashCode int
The hash code for this object. [...]
read-only, inherited
id StudyRuntimeId?
Composite ID for this study runtime, comprised of the studyDeploymentId and device role name.
read-only, inherited
isDeployed bool
Determines whether the study has stopped and no more further data is being collected.
read-only, inherited
isInitialized bool
Determines whether this StudyRuntime has been initialized.
read-only, inherited
isStopped bool
Determines whether the device deployment has completed successfully.
read-only, inherited
masterDeployment SmartphoneDeployment?
The master device deployment running in this controller.
permissions Map<Permission, PermissionStatus>?
The permissions granted to this study from the OS.
read / write
powerAwarenessState PowerAwarenessState
read / write
privacySchemaName String?
The privacy schema used to encrypt data before upload.
remainingDevicesToRegister List<DeviceDescriptor>
The list of devices that still remain to be registrered before all devices in this study runtime is registrered.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
samplingSize int
The sampling size of this deployment in terms of number of DataPoint objects that has been collected.
status StudyRuntimeStatus
The status of this StudyRuntime.
read / write, inherited
statusEvents Stream<StudyRuntimeStatus>
The stream of StudyRuntimeStatus events for this controller.
read-only, inherited
studyDeploymentId String?
The ID of the deployed study for which to collect data.
read / write, inherited
studyDeploymentStartTime DateTime?
transformer DatumTransformer
The datum transformed used to transform data before upload.


askForAllPermissions() Future<void>
Asking for all permissions needed for the included sampling packages. [...]
configure({SamplingSchema? samplingSchema, DataEndPoint? dataEndPoint, String privacySchemaName = NameSpace.CARP, DatumTransformer? transformer, bool askForPermissions = true, bool enableNotifications = true}) Future<void>
Configure this SmartphoneDeploymentController. Must be called only once, and before resume is called. [...]
disablePowerAwareness() → void
Disable power-aware sensing.
enablePowerAwareness() Future
Enable power-aware sensing in this study. See PowerAwarenessState.
initialize(DeploymentService deploymentService, DeviceRegistry deviceRegistry, String studyDeploymentId, String deviceRoleName, DeviceRegistration deviceRegistration) Future
Instantiate a StudyRuntime by registering the client device in a DeploymentService. In case the device is immediately ready for deployment, also deploy. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
pause() → void
Pause this controller, which will pause data collection and close the data manager.
resume() → void
Resume this controller, i.e. resume data collection according to the parameters specified in configure. [...]
stop() → void
Stop the sampling. [...]
toString() String
A string representation of this object. [...]
tryDeployment() Future<StudyRuntimeStatus>
Verifies whether the master device is ready for deployment and in case it is, deploys. In case already deployed, nothing happens.
tryRegisterConnectedDevice(DeviceDescriptor device) Future
Tries to register a connected device which are available in this device's deviceRegistry as well as in the deploymentService.
tryRegisterConnectedDevices() Future
Tries to register all connected devices which are available in this device's deviceRegistry as well as in the deploymentService. [...]


operator ==(Object other) bool
The equality operator. [...]