BackgroundSensingUserTask class
A non-UI sensing task that collects sensor data in the background.
For example, a noise
datum.
It resumes sensing when the onStart methods is called and pauses sensing when the onDone methods is called.
- Inheritance
- Implementers
Constructors
-
BackgroundSensingUserTask(AppTaskExecutor<
AppTask> executor)
Properties
-
appTaskExecutor
→ AppTaskExecutor<
AppTask> -
The AppTaskExecutor of this user task.
no setterinherited
- description → String
-
no setterinherited
- enqueued ↔ DateTime
-
The time this task was added to the queue.
getter/setter pairinherited
-
executor
→ TaskExecutor<
TaskDescriptor> -
The TaskExecutor that is to be executed once the user
want to start this task.
no setterinherited
- expiresIn → Duration?
-
Returns a Duration until this task expires and is removed from the queue.
The returned Duration will be negative if
this
has expired. Returnsnull
if this task never expires.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- hasNotificationBeenCreated ↔ bool
-
Has a notification been created via a NotificationController in the
phone's notification system?
getter/setter pairinherited
- id ↔ String
-
getter/setter pairinherited
- instructions → String
-
no setterinherited
- notification → bool
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state ↔ UserTaskState
-
The state of this task.
getter/setter pairinherited
-
stateEvents
→ Stream<
UserTaskState> -
A stream of state changes of this user task.
no setterinherited
- task → AppTask
-
The AppTask from which this user task originates 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
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onCancel(
BuildContext context, {bool dequeue = false}) → void -
Callback from the app if this task is canceled.
inherited
-
onDone(
BuildContext context, {bool dequeue = false}) → void -
Callback from app when this task is done.
override
-
onExpired(
BuildContext context) → void -
Callback from the app if this task is expired.
inherited
-
onNotification(
) → void -
Callback from the OS when this task is clicked
by the user in the OS notification system.
inherited
-
onStart(
BuildContext context) → void -
Callback from the app when this task is to be started.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- ONE_TIME_SENSING_TYPE → const String
- A type of sensing user task which can be resumed once. See OneTimeBackgroundSensingUserTask.
- SENSING_TYPE → const String
- A type of sensing user task which can be resumed and paused.