SmartPhoneClientManager class

Inheritance
  • Object
  • ClientManager<Smartphone, DeviceRegistration>
  • SmartphoneClient
  • SmartPhoneClientManager
Mixed in types

Constructors

SmartPhoneClientManager()
Get the singleton SmartPhoneClientManager.
factory

Properties

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
permissions Map<Permission, PermissionStatus>
The permissions granted to this client from the OS.
no setter
registration ↔ DeviceRegistration?
The registration of this client.
getter/setter pairinherited
repository Map<Study, StudyRuntime<DeviceRegistration>>
Repository of StudyRuntime mapped to a Study.
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 List<Study>
The list of studies deployed on this client manager.
no setter
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(String studyDeploymentId, String deviceRoleName) Future<Study>
Add a study which needs to be executed on this client. This involves registering this device for the specified study deployment.
override
addStudyProtocol(StudyProtocol protocol) Future<Study>
Create and add a study based on the protocol which needs to be executed on this client.
askForAllPermissions() Future<void>
Asking for all permissions needed for the included sampling packages.
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
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(Study study) SmartphoneDeploymentController?
Get the StudyRuntime for a study.
override
getStudyStatusList() List<StudyStatus>
Get the status for the studies which run on this client device.
inherited
lookupStudyRuntime(String studyDeploymentId, String deviceRoleName) SmartphoneDeploymentController?
Lookup the StudyRuntime based on the studyDeploymentId and deviceRoleName.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeStudy(Study study) Future<void>
Remove study 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).
start() → void
Start all studies in this client manager.
stop() Future<void>
Stop all studies in this client manager.
stopStudy(Study study) Future<void>
Permanently stop collecting data for study and then remove it.
inherited
toString() String
A string representation of this object.
inherited
tryDeployment(Study study) 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.
inherited

Operators

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