AndroidAlarmManager class

A Flutter plugin for registering Dart callbacks with the Android AlarmManager service.

See the example/ directory in this package for sample usage.

Constructors

AndroidAlarmManager()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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

Static Methods

cancel(int id) Future<bool>
Cancels a timer. [...]
initialize() Future<bool>
Starts the AndroidAlarmManager service. This must be called before setting any alarms. [...]
oneShot(Duration delay, int id, Function callback, {bool alarmClock: false, bool allowWhileIdle: false, bool exact: false, bool wakeup: false, bool rescheduleOnReboot: false}) Future<bool>
Schedules a one-shot timer to run callback after time delay. [...]
oneShotAt(DateTime time, int id, Function callback, {bool alarmClock: false, bool allowWhileIdle: false, bool exact: false, bool wakeup: false, bool rescheduleOnReboot: false}) Future<bool>
Schedules a one-shot timer to run callback at time. [...]
periodic(Duration duration, int id, Function callback, {DateTime startAt, bool exact: false, bool wakeup: false, bool rescheduleOnReboot: false}) Future<bool>
Schedules a repeating timer to run callback with period duration. [...]
setTestOverides({_Now now, _GetCallbackHandle getCallbackHandle}) → void
This is exposed for the unit tests. It should not be accessed by users of the plugin.
@visibleForTesting