WorkmanagerAndroid class

Android implementation of WorkmanagerPlatform.

Inheritance
  • Object
  • PlatformInterface
  • WorkmanagerAndroid

Constructors

WorkmanagerAndroid.new()
Constructs an AndroidWorkmanager.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelAll() Future<void>
Cancel all registered tasks.
cancelByTag(String tag) Future<void>
Cancel a task by its tag.
cancelByUniqueName(String uniqueName) Future<void>
Cancel a task by its unique name.
initialize(Function callbackDispatcher, {bool isInDebugMode = false}) Future<void>
Initialize the platform workmanager with the callback function.
isScheduledByUniqueName(String uniqueName) Future<bool>
Check if a task is scheduled by its unique name (Android only).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printScheduledTasks() Future<String>
Print scheduled tasks for debugging (iOS only).
registerOneOffTask(String uniqueName, String taskName, {Map<String, dynamic>? inputData, Duration? initialDelay, Constraints? constraints, ExistingWorkPolicy? existingWorkPolicy, BackoffPolicy? backoffPolicy, Duration? backoffPolicyDelay, String? tag, OutOfQuotaPolicy? outOfQuotaPolicy}) Future<void>
Register a one-off task that will be executed once in the background.
registerPeriodicTask(String uniqueName, String taskName, {Duration? frequency, Duration? flexInterval, Map<String, dynamic>? inputData, Duration? initialDelay, Constraints? constraints, ExistingPeriodicWorkPolicy? existingWorkPolicy, BackoffPolicy? backoffPolicy, Duration? backoffPolicyDelay, String? tag}) Future<void>
Register a periodic task that will be executed repeatedly in the background.
registerProcessingTask(String uniqueName, String taskName, {Duration? initialDelay, Map<String, dynamic>? inputData, Constraints? constraints}) Future<void>
Register a processing task (iOS only).
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

registerWith() → void
Registers this class as the default instance of WorkmanagerPlatform.