BackgroundSensingUserTask class
A user task without UI that collects sensor data in the background.
E.g. noise.
Sensing starts on onStart and stops on onDone. Created by the SensingUserTaskFactory for app tasks of type AppTask.SENSING_TYPE.
Constructors
-
BackgroundSensingUserTask(AppTaskExecutor<
AppTask> executor)
Properties
-
appTaskExecutor
→ AppTaskExecutor<
AppTask> -
The AppTaskExecutor this user task wraps.
no setterinherited
- availableForUser → bool
-
Whether the user can do this task now.
no setterinherited
- backgroundTaskExecutor ↔ BackgroundTaskExecutor
-
Collects the measures of AppTask.backgroundTask once started.
getter/setter pairinherited
- description → String
-
no setterinherited
- doneTime ↔ DateTime?
-
The time this task was marked as done in the onDone method.
getter/setter pairinherited
- enqueued ↔ DateTime
-
The time this task was added to the queue.
getter/setter pairinherited
- expiresIn → Duration?
-
The time left until this task expires, based on AppTask.expire.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasNotificationBeenCreated ↔ bool
-
Whether the NotificationManager has created a notification for it.
getter/setter pairinherited
- hasWidget → bool
-
Whether this task has a widget to show to the user. False by default.
no setterinherited
- id ↔ String
-
A unique id of this user task, a v4 UUID.
getter/setter pairinherited
- instructions → String
-
no setterinherited
- name → String
-
no setterinherited
- notification → bool
-
Whether a notification should be shown for this task.
no setterinherited
- result ↔ Data?
-
The result of this task, set by onDone. Null until then.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state ↔ UserTaskState
-
The state of this task. Setting it emits the new state on stateEvents.
getter/setter pairinherited
-
stateEvents
→ Stream<
UserTaskState> -
A stream of state changes of this user task.
no setterinherited
- studyDeploymentId → String?
-
The id of the study deployment this task belongs to.
no setterinherited
- task → AppTask
-
The AppTask this user task was created from.
no setterinherited
- title → String
-
no setterinherited
- triggerTime ↔ DateTime
-
The time this task should trigger (typically becoming visible to the user).
getter/setter pairinherited
- type → String
-
no setterinherited
- widget → Widget?
-
The widget to be shown to the user as part of this task, if any.
Note that the user interface may not be available before the onStart
method has been called.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onCancel(
{bool dequeue = false}) → void -
Called by the app when the user cancels this task.
inherited
-
onDone(
{bool dequeue = false, Data? result}) → void -
Called by the app when the user has finished this task.
override
-
onExpired(
{bool dequeue = true}) → void -
Called by the app when this task expires.
inherited
-
onNotification(
) → void -
Starts the background sensing when the user taps the notification.
override
-
onStart(
) → void -
Called by the app when the user starts this task.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited