flutter_foreground_task
This plugin is used to implement a foreground service on the Android platform.
11.0.1
171K downloads/mo
#912 most downloaded on pub.dev
Dev-hwang/flutter_foreground_task
What this package is like to depend on
Last release 4 days ago
20 Aug 2026
Release timing varies
gaps range from 9 days to 8 months
Nearly every release is documented
notes for 98 of 101 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
101 releases · first in 2021
6 releases in the last 12 months
see the full history below
Release timeline
101 releases · Apr 2021 to Aug 2026
2022
2023
2024
2025
2026
Releases
latest 60 of 101-
11.0.120 Aug 2026Release notes
Open source →- [CHORE] Upgrade shared_preferences from 2.5.3 to 2.5.5
- [DOCS] Update README
-
11.0.018 Aug 2026Release notes
Open source →- [CHORE] Bump minimum supported SDK version to
Flutter 3.44/Dart 3.12 - [FEAT] Migrate to built-in Kotlin (KGP) #385
- [FEAT] Support Swift Package Manager (SPM) #387
- Check migration_documentation for changes
- [CHORE] Bump minimum supported SDK version to
-
10.0.015 Jul 2026Release notes
Open source →- [CHORE] Bump minimum supported SDK version to
Flutter 3.38.0 - [FEAT] Add UIScene life cycle support for iOS #378
- [CHORE] Bump minimum supported SDK version to
-
9.2.201 Apr 2026Release notes
Open source →- [FIX] Resolved frequent ForegroundServiceDidNotStartInTime and ForegroundServiceDidNotStopInTime exceptions by avoiding redundant foreground service start contracts. #377
-
9.2.103 Mar 2026 -
9.2.024 Dec 2025Release notes
Open source →- [FEAT] Add
allowAutoRestartoption, which enables the service to automatically restart if it is terminated by the system. - [FEAT] Add
stopWithTaskoption, to ensure service termination when the app UI is dismissed. - [FEAT] Add
mediaProcessingforeground service type. - [FIX] Fix
FLAG_STOP_WITH_TASKbitmask check error.
- [FEAT] Add
-
9.1.014 Apr 2025Release notes
Open source →- [FEAT] Support manual foregroundServiceType via serviceTypes in startService
-
9.0.013 Apr 2025Release notes
Open source →- [CHORE] Bump minimum supported SDK version to
Flutter 3.22/Dart 3.4 - [CHORE] Bump
kotlin_version(1.7.10 -> 1.9.10),gradle(7.3.0 -> 8.6.0)for Android 15 - [FEAT] Add
isTimeoutparam to the onDestroy callback - [FIX] Fix "null object" error #332
- [FIX] Fix "Reply already submitted" error #330
- [FIX] Prevent crash by catching exceptions during foreground service start
- Check migration_documentation for changes
- [CHORE] Bump minimum supported SDK version to
-
8.17.002 Dec 2024Release notes
Open source →- [FEAT] Allow
onNotificationPressedto trigger withoutSYSTEM_ALERT_WINDOWpermission- Do not use the
launchAppfunction inside theonNotificationPressedcallback - Instead, use the
notificationInitialRouteoption of thestartServiceorupdateServicefunctions
- Do not use the
- [FEAT] Allow
-
8.16.001 Dec 2024Release notes
Open source →- [BREAKING] Change
ServiceRequestResultclass tosealed classfor improved code readability - [BREAKING] Change method for customizing notification icon
- [FEAT] Add
copyWithfunction for models reuse - Check migration_documentation for changes
- [BREAKING] Change
-
8.14.020 Nov 2024 -
8.13.001 Nov 2024 -
8.12.029 Oct 2024Release notes
Open source →- [FEAT] Add
setOnlyAlertOnceoption to AndroidNotificationOptions pr-#287 - [CHANGE] Change notification channel importance from
DEFAULTtoLOW
- [FEAT] Add
-
8.11.023 Oct 2024Release notes
Open source →- [FEAT] Allow sending
Setcollection usingFlutterForegroundTask.sendDataToMain
- [FEAT] Allow sending
-
8.10.404 Oct 2024Release notes
Open source →- [FIX] Fixed an issue where main function was called repeatedly when there was no callback to start
- [FIX] Handle exceptions that occur when service component cannot be found
-
8.10.202 Oct 2024Release notes
Open source →- [FIX] Fixed an issue where exception was thrown when flutterEngine failed to start #282
- [FIX] Fixed an issue with flutterEngine not being destroyed properly
-
8.10.024 Sep 2024Release notes
Open source →- [BREAKING] Change
onStart,onDestroycallback return type fromvoidtoFuture<void>- The onRepeatEvent callback is called when the onStart asynchronous operation has finished
- Now you can access network, database, and other plugins in onDestroy callback #276
- Check migration_documentation for changes
- [BREAKING] Change
-
8.9.023 Sep 2024Release notes
Open source →- [CHANGE] Ignore
autoRunOnBootoption when service is stopped by developer - [CHANGE] Ignore
autoRunOnBootoption when android:stopWithTask is set to true - [FEAT] Add TaskStarter to check who started the task #276
- Add
starterparameter toonStartcallback of TaskHandler .developer: The task has been started by the developer (startService, restartService, updateService).system: The task has been started by the system (reboot, app-updates, AlarmManager-restart)
- Add
- [FEAT-iOS] Allow background app refresh
Bump iOS minimumVersion to 13.0- You need to add
BGTaskSchedulerPermittedIdentifierskey inios/Runner/info.plistfile - Check Getting started-iOS for more details
- [CHANGE] Ignore
-
8.8.106 Sep 2024 -
8.8.1+109 Sep 2024 -
8.8.003 Sep 2024Release notes
Open source →- [REMOVE] Remove notification permission request code in startService
- Notification permission request is required before starting the service
- Check step-4 of readme
- [FIX-Android] Fix issue with calling onRepeatEvent without waiting for repeat delay after onStart
- If use the
eventAction: ForegroundTaskEventAction.repeat(millis) - flow:
onStart- (millis) -onRepeatEvent- (millis) -onRepeatEvent..
- If use the
- [REMOVE] Remove notification permission request code in startService
-
8.7.001 Sep 2024Release notes
Open source →- [FEAT] Allow permission settings page to be opened even if permission is granted
- openIgnoreBatteryOptimizationSettings()
- openSystemAlertWindowSettings()
- openAlarmsAndRemindersSettings()
- [FEAT] Allow permission settings page to be opened even if permission is granted
-
8.6.028 Aug 2024Release notes
Open source →- [BREAKING] Change the way to set the task intervals (for increase scalability)
- Remove
interval,isOnceEventoption in ForegroundTaskOptions model - Add
eventActionoption with ForegroundTaskEventAction constructor - Check migration_documentation for changes
- Remove
- [BREAKING] Change the way to set the task intervals (for increase scalability)
-
8.5.023 Aug 2024Release notes
Open source →- [FEAT] Add
openAlarmsAndRemindersSettingsutility- This utility allows the Android OS to immediately restart service in doze mode.
- required
android.permission.SCHEDULE_EXACT_ALARMpermission. - When you call this function, will be gone to the settings page. So you need to explain to the user why set it.
- Check utility_documentation for more details.
- [FEAT] Add
canScheduleExactAlarmsutility- Returns whether the
android.permission.SCHEDULE_EXACT_ALARMpermission is granted. - In some cases, permission is granted automatically. Don't worry :)
- Returns whether the
- [FEAT] Add
-
8.4.023 Aug 2024Nothing published for this version
-
8.3.121 Aug 2024Release notes
Open source →- [FIX] Fixed an issue where Map collection could not be cast in onReceiveData #258
-
8.3.009 Aug 2024Release notes
Open source →- [FEAT] Add showBadge option to AndroidNotificationOptions.
- [DEPRECATED] Deprecated AndroidNotificationOptions.id. Use startService(serviceId) instead.
- [DOCS] Separate models, utility, migration documentation.
-
8.2.007 Aug 2024 -
8.1.006 Aug 2024Release notes
Open source →- [FIX-AOS] Fixed an issue where notification text was not visible on Android 7.1 and below
- [FEAT-iOS] Implement onNotificationButtonPressed
- [FEAT-iOS] Implement onNotificationPressed
- [FEAT-iOS] Implement onNotificationDismissed
- [FEAT-iOS] Implement notification permission request and check function
- Request notification permission in the
Example._requestPermissionsfunction
- Request notification permission in the
-
8.0.023 Jul 2024Release notes
Open source →- [BREAKING] Redesign the communication method between TaskHandler and UI
- Fixed an issue where
SendPort.senddoes not work when callingreceivePortgetter function after app restart #244 - Allow task data to be listened on multiple pages
- Check migration_documentation for changes
- Fixed an issue where
- [BREAKING] Redesign the communication method between TaskHandler and UI
-
7.5.222 Jul 2024Release notes
Open source →- [FIX] Fixed an issue that caused poor performance and delays in TaskHandler
- [FIX-iOS] Fixed an issue where onDestroy was not called when an app was closed in recent apps
-
7.5.019 Jul 2024Release notes
Open source →- [FEAT] Support notificationText with multiple lines #182
- [REMOVE] Remove
WillStartForegroundTaskwidget- This widget is designed to start a service when the app is minimized.
- This widget had an ambiguous purpose, it caused a lot of problems because the widget controlled the service.
- These issues have led me to remove this widget. Please implement it yourself if necessary.
-
7.5.0+121 Jul 2024Release notes
Open source →- [DOCS] Update readme
- Update documentation on how to pass timestamp to UI isolate
- Update
WithForegroundTaskdocumentation comments
- [DOCS] Update readme
-
7.4.318 Jul 2024Release notes
Open source →- [FEAT-Recommended] Improve restart alarm that occurs when the service terminates abnormally
-
7.4.218 Jul 2024 -
7.4.018 Jul 2024Release notes
Open source →- [FEAT] Add result class to handle service request errors
- The return value of service request functions changed from boolean to
ServiceRequestResult
- The return value of service request functions changed from boolean to
- [FEAT] Add function to send data to TaskHandler
- You can send data from UI to TaskHandler using
FlutterForegroundTask.sendDatafunction
- You can send data from UI to TaskHandler using
- [FEAT] Add result class to handle service request errors
-
7.2.016 Jul 2024Release notes
Open source →- [FEAT] Add ability to restart service when app is deleted from recent app list
- To restart service on Android 12+, you must allow the
REQUEST_IGNORE_BATTERY_OPTIMIZATIONSpermission
- To restart service on Android 12+, you must allow the
- [REMOVE] Remove
isStickyfrom AndroidNotificationOptions- The isSticky option is automatically set by the service based on the Manifest android:stopWithTask
- [FEAT] Add ability to restart service when app is deleted from recent app list
-
7.1.014 Jul 2024Release notes
Open source →- [FEAT-Recommended] Allow updateService to be processed without service restart
-
7.0.013 Jul 2024Release notes
Open source →- [CHORE] Updates minimum supported SDK version to
Flutter 3.10/Dart 3.0 - [BREAKING] Change timezone(local > UTC) of timestamp in TaskHandler callback
- [BREAKING] Remove
iconData,buttonsfrom AndroidNotificationOptions- Can use this options in the startService function
- Check migration_documentation for changes
- [FEAT] Add ability to update notification icon and buttons for Android platform
- [FEAT] Add
onNotificationDismissedcallback for Android 14
- [CHORE] Updates minimum supported SDK version to
-
6.5.012 Jun 2024Release notes
Open source →- [CHORE] Bump Android minSdkVersion to 23
- [FIX] Fixed an issue where notification actions did not work on Android 14
-
6.4.004 Jun 2024Release notes
Open source →- [REMOVE] Remove
foregroundServiceTypeoption - [FEAT] Add
autoRunOnMyPackageReplacedoption
- [REMOVE] Remove
-
6.3.004 Jun 2024Release notes
Open source →- [FEAT]
Add option to allow multiple foregroundServiceType - [DOCS] Update readme
- [FEAT]
-
6.2.025 Apr 2024Release notes
Open source →- [FEAT] Support AGP 8
- [FEAT]
AddforegroundServiceTypeoption to specify foreground service type on Android 14 and higher
-
6.1.316 Feb 2024Release notes
Open source →- [DOCS] Update readme #192
- [CHORE] Remove platform dependency
- [CHORE] Update dependencies
-
6.1.213 Sep 2023Release notes
Open source →- [FIX] Fix issue where SecurityException occurred when registering runtime receiver #175
-
6.1.124 Aug 2023 -
6.1.022 Aug 2023Release notes
Open source →- [BREAKING] Remove future return of TaskHandler callback function
- [FIX] Fix issue where isRunningService is not updated after calling onDestroy
- [FIX] Fix storage data not syncing between isolates
- [FIX] Fix the service could not be started when the notification channel information is empty
- [CHORE] Upgrade dependencies - shared_preferences
-
6.0.002 Jun 2023Release notes
Open source →- [BREAKING] Rename the callback function to clarify what information the event provides
- Rename
onButtonPressedtoonNotificationButtonPressed - Rename
onEventtoonRepeatEvent
- Rename
- [FEAT] Add textColor option to NotificationButton
- [FEAT] Add ability to change task options while service is running
- [BREAKING] Rename the callback function to clarify what information the event provides
-
6.0.0+112 Jun 2023Release notes
Open source →- [REFACTOR] Move required permissions on the Android platform inside the plugin
-
5.2.131 May 2023 -
5.2.023 May 2023Release notes
Open source →- [FEAT] Add id option to AndroidNotificationOptions
- [FEAT] The WillStartForegroundTask widget supports receiving data
-
5.0.022 May 2023Release notes
Open source →- [CHORE] Update dependency constraints to
sdk: '>=2.18.0 <4.0.0'flutter: '>=3.3.0' - [FEAT] Add notification permission request func for Android 13
FlutterForegroundTask.checkNotificationPermission()FlutterForegroundTask.requestNotificationPermission()
- [DOCS] Update documentation to the latest version
- [FIX] Fix service not starting when notification permission is denied
- [CHORE] Update dependency constraints to
-
4.2.018 May 2023Release notes
Open source →- [FEAT] Add notification permission request func for Android 13
- According to the official documentation, starting with Android 13 and higher, you need to request notification permission to expose foreground service notifications.
- In this version, notification permission requests occur when the
startServicefunction is called. - Add
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />permission to yourAndroidManifest.xmlfile.
- [FEAT] Add notification permission request func for Android 13
-
4.1.017 Feb 2023Release notes
Open source →- [CHORE] Bump Android coroutines version to 1.6.4
- [CHANGE] Change the way get receivePort from asynchronous to synchronous #128
- Can register and get receivePort without starting the service.
- From now on, register receivePort before starting the service. Please check the readme and example.
- [FIX] Fix issue where the results of the service start and stop functions did not match the service status
-
4.0.107 Feb 2023 -
4.0.007 Feb 2023 -
3.10.025 Sep 2022Release notes
Open source →- [FEAT] Add
isOnceEventoption toForegroundTaskOptions.class. - [DOCS] Add
entry-pointpragma. - [REFACTOR] Refactor code using plugin_platform_interface.
- [FEAT] Add
-
3.9.014 Sep 2022Release notes
Open source →- [FEAT] Add
allowWakeLockoption toForegroundTaskOptions.class. - [FEAT] Add
forceOpenoption toopenSystemAlertWindowSettings().
- [FEAT] Add
-
3.8.216 Aug 2022Release notes
Open source →- Fix issue with SharedPreferences won't provide updated data from main isolate while running on background. Thanks @h2210316651
-
3.8.119 Jul 2022