Skip to content

AppTaskControlExecutor

Runs a TaskControl with an AppTask and a Schedulable trigger.

Unlike TaskControlExecutor, it does not wait for the trigger to fire. On resume it computes the trigger's schedule for the next 15 days and buffers one app task per time in the AppTaskController, which schedules them as notifications. It then pauses, and resumes again when the last scheduled time has passed, if the app is still running.

Inheritance

Constructors

AppTaskControlExecutor

AppTaskControlExecutor(
  1. TaskControl taskControl,
  2. TriggerConfiguration trigger,
  3. TaskConfiguration task,
  4. DeviceConfiguration<DeviceRegistration> targetDevice,
)

Properties

taskExecutor

AppTaskExecutor<AppTask> get taskExecutor
override

triggerExecutor

Methods

onPause

Future<bool> onPause()
override

Called by pause. Returns true if successfully paused.

If false, the state is not changed.

onResume

Future<bool> onResume()
override

Called by resume. Returns true if successfully resumed.

If false, the executor moves to ExecutorState.PausedButShouldBeResumed.