SmartPhoneClientManager class

Inheritance
  • Object
  • ClientManager<PrimaryDeviceConfiguration<DeviceRegistration>, DeviceRegistration>
  • SmartPhoneClientManager
Mixed-in types

Constructors

SmartPhoneClientManager()
Get the singleton SmartPhoneClientManager.
factory

Properties

askForPermissions bool
Will this client manager ask for permission when a new study is deployed?
no setter
deploymentService → DeploymentService?
The application service through which study deployments, to be run on this client, can be managed and retrieved.
no setterinherited
deviceController DeviceController
The controller of connected devices used to collect data locally on this primary device. Also works as a factory which is used to create DeviceDataCollector instances for connected devices.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
heartbeat bool
Is this client sending Heartbeat measurements for its studies?
no setter
isConfigured bool
Determines whether a DeviceRegistration has been configured for this client, which is necessary to start adding StudyRuntimes.
no setterinherited
measurements Stream<Measurement>
The stream of all Measurements collected by this client manager. This is the aggregation of all measurements collected by the studies running on this client.
no setter
notificationController NotificationController?
The NotificationController responsible for sending notification on AppTasks.
no setter
registration ↔ DeviceRegistration?
The registration of this client.
getter/setter pairinherited
repository Map<String, StudyRuntime<DeviceRegistration>>
Repository of StudyRuntime mapped to the study deployment ID.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ClientManagerState
The runtime state of this client manager.
no setter
studies Map<String, Study>
All studies added to this client mapped to the study deployment ID.
getter/setter pairinherited
studyCount int
The number of studies running on this client.
no setter

Methods

activate() → void
Called when this client manager is being (re-)activated by the OS.
addStudy(Study study) Future<SmartphoneStudy>
Add a study which needs to be executed on this client. This involves registering this device for the specified study deployment.
override
addStudyFromInvitation(ActiveParticipationInvitation invitation) Future<SmartphoneStudy>
Add a study based on an invitation which needs to be executed on this client.
addStudyFromProtocol(StudyProtocol protocol) Future<SmartphoneStudy>
Create and add a study based on the protocol which needs to be executed on this client.
configure({DeploymentService? deploymentService, DeviceDataCollectorFactory? deviceController, DeviceRegistration? registration, bool enableNotifications = true, NotificationController? notificationController, bool askForPermissions = true, bool heartbeat = true}) Future<void>
Configure this SmartPhoneClientManager.
override
deactivate() Future<void>
Called when this client manager is being deactivated and potentially stopped by the OS.
didChangeAccessibilityFeatures() → void
Called when the system changes the set of currently active accessibility features.
inherited
didChangeAppLifecycleState(AppLifecycleState state) → void
Called when the system puts the app in the background or returns the app to the foreground.
override
didChangeLocales(List<Locale>? locales) → void
Called when the system tells the app that the user's locale has changed. For example, if the user changes the system language settings.
inherited
didChangeMetrics() → void
Called when the application's dimensions change. For example, when a phone is rotated.
inherited
didChangePlatformBrightness() → void
Called when the platform brightness changes.
inherited
didChangeTextScaleFactor() → void
Called when the platform's text scale factor changes.
inherited
didChangeViewFocus(ViewFocusEvent event) → void
Called whenever the PlatformDispatcher receives a notification that the focus state on a view has changed.
inherited
didHaveMemoryPressure() → void
Called when the system is running low on memory.
inherited
didPopRoute() Future<bool>
Called when the system tells the app to pop the current route, such as after a system back button press or back gesture.
inherited
didPushRoute(String route) Future<bool>
Called when the host tells the application to push a new route onto the navigator.
inherited
didPushRouteInformation(RouteInformation routeInformation) Future<bool>
Called when the host tells the application to push a new RouteInformation and a restoration state onto the router.
inherited
didRequestAppExit() Future<AppExitResponse>
Called when a request is received from the system to exit the application.
inherited
dispose() → void
Called when this client is disposed permanently.
getStudyRuntime(String studyDeploymentId) SmartphoneDeploymentController?
Get the StudyRuntime for a studyDeploymentId.
override
getStudyStatusList() List<StudyStatus>
Get the status for the studies which run on this client device.
inherited
handleCancelBackGesture() → void
Called when a predictive back gesture is canceled, indicating that no navigation should occur.
inherited
handleCommitBackGesture() → void
Called when a predictive back gesture is finished successfully, indicating that the current route should be popped.
inherited
handleStartBackGesture(PredictiveBackEvent backEvent) bool
Called at the start of a predictive back gesture.
inherited
handleUpdateBackGestureProgress(PredictiveBackEvent backEvent) → void
Called when a predictive back gesture moves.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeStudy(String studyDeploymentId) Future<void>
Remove the study with studyDeploymentId from this client manager.
override
resume() Future<int>
Restore and resume all study deployments which were running on this client manager when the app was killed / stopped (e.g., by the OS).
save() Future<void>
Persistently save information related to this client manger. Typically used for later resuming when app is restarted. See resume.
start() → void
Start all studies in this client manager.
stop() Future<void>
Stop all studies in this client manager.
stopStudy(String studyDeploymentId) Future<void>
Permanently stop collecting data for study and mark it as stopped.
inherited
toString() String
A string representation of this object.
inherited
tryDeployment(String studyDeploymentId) Future<StudyStatus>
Verifies whether the device is ready for deployment of the study runtime identified by study, and in case it is, deploys. In case already deployed, nothing happens and the status of the deployment is returned.
inherited

Operators

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