BackgroundSensingUserTask
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
Methods
onDone
Called by the app when the user has finished this task.
Sets result, doneTime and state, and marks the task as done in the AppTaskController. If dequeue is true the task is also removed from the queue.
onNotification
override
Starts the background sensing when the user taps the notification.
When the background sensing pauses, the task is marked as done.
onStart
override
Called by the app when the user starts this task.
Initializes backgroundTaskExecutor and sets state to UserTaskState.started.