SmartphoneDeployment class

Contains the entire description and configuration for how a smartphone device participates in the deployment of a study on a smartphone.

  • Object
  • PrimaryDeviceDeployment
  • SmartphoneDeployment
Mixed in types
  • @JsonSerializable(fieldRename: FieldRename.none, includeIfNull: false)


SmartphoneDeployment({String? studyDeploymentId, required PrimaryDeviceConfiguration<DeviceRegistration> deviceConfiguration, required DeviceRegistration registration, Set<DeviceConfiguration<DeviceRegistration>> connectedDevices = const {}, Map<String, DeviceRegistration?> connectedDeviceRegistrations = const {}, Set<TaskConfiguration> tasks = const {}, Map<String, TriggerConfiguration> triggers = const {}, Set<TaskControl> taskControls = const {}, Set<ExpectedParticipantData> expectedParticipantData = const {}, String? userId, StudyDescription? studyDescription, DataEndPoint? dataEndPoint, String? privacySchemaName})
Create a new SmartphoneDeployment.
SmartphoneDeployment.fromJson(Map<String, dynamic> json)
SmartphoneDeployment.fromPrimaryDeviceDeployment({String? studyId, String? studyDeploymentId, String? userId, required PrimaryDeviceDeployment deployment})
Create a SmartphoneDeployment based on a PrimaryDeviceDeployment.
SmartphoneDeployment.fromPrimaryDeviceDeploymentAndSmartphoneStudyProtocol({String? studyId, String? studyDeploymentId, String? userId, required PrimaryDeviceDeployment deployment, required SmartphoneStudyProtocol protocol})
Create a SmartphoneDeployment that combines a PrimaryDeviceDeployment and a SmartphoneStudyProtocol.
SmartphoneDeployment.fromSmartphoneStudyProtocol({String? studyId, String? studyDeploymentId, String? userId, required String primaryDeviceRoleName, required SmartphoneStudyProtocol protocol})
Create a SmartphoneDeployment based on a SmartphoneStudyProtocol. This method basically makes a 1:1 mapping from the protocol to the deployment using a Smartphone as the primary device with the specified primaryDeviceRoleName.


applicationData Map<String, dynamic>?
getter/setter pairinherited
connectedDeviceRegistrations Map<String, DeviceRegistration?>
Preregistration of connected devices, including information such as connection properties, stored per role name.
getter/setter pairinherited
connectedDevices Set<DeviceConfiguration<DeviceRegistration>>
The devices this device needs to connect to.
getter/setter pairinherited
dataEndPoint DataEndPoint?
Specifies where and how to stored or upload the data collected from this deployment. If null, the sensed data is not stored, but may still be used in the app.
getter/setter pairinherited
deployed DateTime?
The timestamp (in UTC) when this deployment was deployed on this smartphone. Is null if not deployed yet.
getter/setter pair
description String
no setterinherited
deviceConfiguration ↔ PrimaryDeviceConfiguration<DeviceRegistration>
The configuration for the primary device this deployment is intended for.
getter/setter pairinherited
devices Set<DeviceConfiguration<DeviceRegistration>>
All devices this deployment is using.
no setter
expectedDataStreams Set<ExpectedDataStream>
The set of expected data streams from this device deployment.
no setterinherited
expectedParticipantData Set<ExpectedParticipantData>
Expected data about participants in the deployment to be input by users.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
lastUpdatedOn DateTime
The time when this device deployment was last updated. This corresponds to the most recent device registration as part of this device deployment.
no setterinherited
measures List<Measure>
Get the list of all measures in this study deployment.
no setter
privacySchemaName String?
The name of a PrivacySchema to be used for protecting sensitive data.
getter/setter pairinherited
registration ↔ DeviceRegistration
Registration for this primary device.
getter/setter pairinherited
responsible StudyResponsible?
The PI responsible for this protocol.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status ↔ StudyStatus
The status of this study deployment.
getter/setter pair
studyDeploymentId String
The unique id of this study deployment.
no setter
studyDescription StudyDescription?
The description of this study protocol containing the title, description, purpose, and the responsible researcher for this study.
getter/setter pairinherited
studyId String?
The unique id of the study that this deployment is part of. Is null if this is a local deployment running only on this phone.
getter/setter pair
taskControls Set<TaskControl>
The specification of tasks triggered and the devices they are sent to.
getter/setter pairinherited
tasks Set<TaskConfiguration>
All tasks which should be able to be executed on this or connected devices.
getter/setter pairinherited
triggers Map<String, TriggerConfiguration>
All triggers originating from this device and connected devices, stored per assigned id unique within the study protocol.
getter/setter pairinherited
userId String?
The unique id of the user that this deployment collects data from.
getter/setter pair


addApplicationData(String key, dynamic value) → void
getApplicationData(String key) → dynamic
getDeviceFromRoleName(String roleName) → DeviceConfiguration<DeviceRegistration>?
Get the DeviceConfiguration based on the roleName. This includes both the primary device and the connected devices. Returns null if no device with roleName is found.
getTaskByName(String name) → TaskConfiguration?
Get the task based on its task name in this deployment.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
removeApplicationData(String key) → void
toJson() Map<String, dynamic>
toString() String
A string representation of this object.


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