SmartphoneStudyController class
Controls the runtime execution of a SmartphoneStudy.
A SmartphoneStudyController is responsible for:
- Orchestrating the lifecycle of a SmartphoneDeploymentExecutor
- Configuring the DataManager based on the study's DataEndPoint
- Requesting OS permissions needed for sampling
- Transforming collected
Measurements using the privacy schema and preferred data format specified in the deployment
Access via SmartPhoneClientManager.getStudyController.
Constructors
- SmartphoneStudyController(SmartphoneStudy study)
-
Create a new SmartphoneStudyController to control the runtime behavior
of a
study.
Properties
- dataEndPoint → DataEndPoint?
-
The configuration of the data endpoint, i.e. how data is saved or uploaded.
Can be null, in which case data is still sampled and can be used in the app,
but is not saved.
no setter
- dataManager → DataManager?
-
The data manager responsible for handling the data collected by this controller.
no setter
- deployment → SmartphoneDeployment?
-
The deployment associated with this study.
no setter
- executor → SmartphoneDeploymentExecutor
-
The executor executing the deployment.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
measurements
→ Stream<
Measurement> -
The stream of all sampled measurements.
no setter
-
permissions
→ Map<
Permission, PermissionStatus> -
The permissions granted to this client from the OS.
no setter
- privacySchemaName → String
-
The privacy schema used to encrypt data before upload.
no setter
-
remainingDevicesToRegister
→ List<
DeviceConfiguration< DeviceRegistration> > -
The list of all devices - both primary and connected devices - that remain
to be registered before all devices in this study are registered.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- study → SmartphoneStudy
-
The study that this SmartphoneStudyController controls
no setter
Methods
-
dispose(
) → void - Called when this controller is disposed.
-
measurementsByType(
String type) → Stream< Measurement> -
A stream of all measurements of a specific data
type. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → void - Pause data sampling.
-
restart(
) → void -
resume(
) → void - Resume data sampling for the study controlled by this controller. Will resume data sampling based on the current sampling state of this study. If you want to restart sampling and ignore any previously stored sampling state, call the restart method instead.
-
start(
) → Future< void> - Start data collection using this controller.
-
toString(
) → String -
A string representation of this object.
inherited
-
tryRegisterConnectedDevice(
DeviceConfiguration< DeviceRegistration> device) → Future<void> -
Tries to register the connected
devicewith the deployment service. Thedevicemust be available in the device controller. -
tryRegisterRemainingDevicesToRegister(
) → Future< void> - Tries to register the connected devices which still need to be registered in the deployment service.
-
tryReregisterDevice(
DeviceConfiguration< DeviceRegistration> device) → Future<void> -
Tries to re-register the
devicewith the deployment service. This entails trying to unregister the device and then trying to register it again. -
tryUnregisterDisconnectedDevice(
DeviceConfiguration< DeviceRegistration> device) → Future<void> -
Tries to unregister the disconnected
devicewith the deployment service.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited