Skip to content
pubscout

android_alarm_manager_plus

5.1.2, released 7 weeks ago by fluttercommunity.dev

Access Android AlarmManager service and run Dart code in the background.

Flutter FavoriteRock solid
$ flutter pub add android_alarm_manager_plus
Source repository

What it does

Allows Flutter applications to access the Android AlarmManager service. Enables running custom Dart code in background background isolates when alarms fire, even if the main app has ended.

AI-written summary of version 5.1.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to trigger recurring tasks or one-off alarms on Android at precise times.
  • You need background tasks to execute when the app is closed or not in the foreground.

Skip it when

  • You need cross-platform background task handling that includes iOS.
  • Your app targets Android 14+ and you cannot handle SCHEDULE_EXACT_ALARM permissions via additional plugins.

Strengths

  • Integrates directly with native Android AlarmManager service.
  • Supports periodic and one-shot background alarms with custom callbacks.

Weaknesses

  • Android only (no iOS or web support documented).
  • Alarms are cleared if the device is rebooted unless properly configured, and will not fire if the app is force-stopped.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
0

Requires adding permissions and receiver/service components to AndroidManifest.xml, plus handling SCHEDULE_EXACT_ALARM permissions for Android 14+ via an additional plugin like permission_handler.

import 'package:android_alarm_manager_plus/android_alarm_manager_plus.dart';

@pragma('vm:entry-point')
static void printHello() {
  print("Hello, world!");
}

main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await AndroidAlarmManager.initialize();
  runApp(...);
  await AndroidAlarmManager.periodic(const Duration(minutes: 1), 0, printHello);
}

Alternatives

Packages that do the same job and could replace android_alarm_manager_plus.

Works with

Packages commonly used together with android_alarm_manager_plus: ones it builds on, ones built on it, and its own family.