background_fetch
Periodic callbacks in the background for both iOS and Android. Includes Android Headless implementation.
1.7.0
75K downloads/mo
#1249 most downloaded on pub.dev
transistorsoft/flutter_background_fetch
What this package is like to depend on
Last release 3 months ago
25 May 2026
Release timing varies
gaps range from 1 weeks to 6 months
Nearly every release is documented
notes for 49 of 54 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
58 releases · first in 2018
6 releases in the last 12 months
see the full history below
Release timeline
58 releases · Nov 2018 to May 2026Releases
latest 58-
1.7.025 May 2026Release notes
Open source →- [iOS] Adopt
FlutterSceneLifeCycleDelegatefor Flutter 3.41 UIScene lifecycle support. - [Changed] Bump minimum Flutter SDK constraint to
>=3.38.0.
- [iOS] Adopt
-
1.6.220 Apr 2026Release notes
Open source →- [Android] Fix
MissingPluginExceptiononcom.transistorsoft/flutter_background_fetch/methodsafter app relaunch when a foreground service kept the process alive post-termination.HeadlessTasknow destroys its backgroundFlutterEnginewhen the main Activity re-attaches, andBackgroundFetchModuletracks method channels per-BinaryMessengerso destroying one engine (e.g. a sibling plugin's headless isolate) no longer strips the handler from another engine's channel.
- [Android] Fix
-
1.6.115 Apr 2026Release notes
Open source →- Update native libs for 4.1.0
- [iOS] Migrate
/exampleto Flutter 3.41 UIScene lifecycle (adoptFlutterImplicitEngineDelegate, register plugins viadidInitializeImplicitFlutterEngine:, addUIApplicationSceneManifestwithFlutterSceneDelegate). TSBackgroundFetch 4.1's+loadauto-registers BGTask launch handlers before the BGTaskScheduler deadline, which is required for UIScene apps where the plugin'sapplication:didFinishLaunchingWithOptions:is delivered too late via Flutter's scene fallback.
-
1.6.014 Apr 2026Release notes
Open source →- [Changed] Renamed
HeadlessTaskclass toHeadlessEventto align with TypeScript API. Atypedef HeadlessTask = HeadlessEventalias is provided for backwards compatibility. - [Changed] Simplified README with links to new Documentation Site.
- [Changed] Renamed
-
1.5.126 Mar 2026Release notes
Open source →- Add CLAUDE.md with SDK architecture, build commands, and conventions
- [iOS] Fix podspec public_header_files glob to match actual header location The public_header_files glob was pointing to Sources/include/ but the header lives under Sources/background_fetch/include/, so the glob matched zero files. This broke module resolution when building with CocoaPods and use_frameworks! from Xcode.
-
1.5.009 Nov 2025Release notes
Open source →- Both the plugin's iOS and Android core libs (
TSBackgroundFetch.xcframework,tsbackgroundfetch.aar) are now published to Cocoapods, Swift Package Manager and Sonatype for android. This is especially wonderful for android, as now there's no more need of the custommaven urlin the rootbuild.gradle. - See the Setup Guides for both iOS and Android (they have changed from previous versions).
- Both the plugin's iOS and Android core libs (
-
1.4.028 Jul 2025 -
1.3.820 Mar 2025 -
1.3.709 Sep 2024 -
1.3.606 Sep 2024Release notes
Open source →- [Android] Remove unrequired dependency
appcompat. - [Android] Bump default
androidx.lifecycle:lifecycle-runtimeversion to2.7.0. - [Android] Add
@NonNullannotations to flutter plugin methods. - [Android] Enable
multidexin Android /example.
- [Android] Remove unrequired dependency
-
1.3.527 May 2024Release notes
Open source →- Update analysis_options.yaml for pub.dev. There are no code changes from 1.3.4.
-
1.3.403 May 2024 -
1.3.322 Apr 2024Release notes
Open source →- [iOS] Code-sign
TSBackgroundFetch.xcframeworkwith new Apple Organization (9224-2932 Quebec Inc) certificate.
- [iOS] Code-sign
-
1.3.227 Mar 2024Release notes
Open source →- [iOS] codesign
TSBackgroundFetch.xcframework. - [iOS] Add
PrivacyInfo.xcprivacyinto.podfileconfig.
- [iOS] codesign
-
1.3.120 Mar 2024 -
1.3.019 Mar 2024 -
1.2.407 Mar 2024 -
1.2.329 Feb 2024Release notes
Open source →- [iOS] ensure
scheduleTaskcallback is executed on main-thread. - [Android] Update Android Setup Instructions for
flutter >= 3.19.0(New Android Architecture).
- [iOS] ensure
-
1.2.210 Jan 2024Release notes
Open source →- [iOS] Only allow registration of
BGProcessingTasks(Permitted background task scheduler identifiers) inInfo.plistwhich are prefixed withcom.transistorsoft. Any other task identifier will be ignored. - [Android] Remove deprecated
registerWithV1 flutter plugin architecture.
- [iOS] Only allow registration of
-
1.2.120 Aug 2023Release notes
Open source →- [Android] Detect and dispose of duplicate events. Android
JobServicehas a bug for devices running <= Android M where multiplebackgrou nd-fetchevents could fire within the same second.
- [Android] Detect and dispose of duplicate events. Android
-
1.2.031 Jul 2023Release notes
Open source →- [Android] Android 14 (SDK 34) support..
- [Android] Android 14 support: When using
forceAlarmManager: true, you must now optionally add the permissionandroid.permission.SCHEDULE_EXACT_ALARMto yourAndroidManifestto schedule exact alarms. OtherwiseAlarmManagerwill use in-exact alarms. :open_file_folder:AndroidManifest. NOTE You must include the permission exactly as-shown withandroid:minSdkVersion="34".
<manifest> <!-- [background-fetch] OPTIONAL: allows forceAlarmManager: true to use exact alarms --> <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" android:maxSdkVersion="33" /> . . . </manifest>- [Android] Fix an issue booting the app with
flutter runwith screen off where plugin incorrectly detects the app is headless.
-
1.1.603 May 2023 -
1.1.516 Feb 2023 -
1.1.428 Jan 2023Release notes
Open source →- [Android] [Fix] Add a null-check in didDetachFromEngine, fixing a reported null-pointer exception.
- [Android] [Added] Log the jobId when .scheduleTask is called so that developers can simulate events with
adb shell.
-
1.1.310 Jan 2023Release notes
Open source →- [Android] Fix error
FlutterJNI was detached from native C++when Android back button is pressed. In this case, Flutter detaches theMainActivityfrom the app and headless-mode was not being detected.
- [Android] Fix error
-
1.1.227 Oct 2022Release notes
Open source →- [Android] add
@pragma('vm:entry-point')to lib's_headlessCallbackDispatcher, required for release builds on Flutter >= 3.3.0.
- [Android] add
-
1.1.130 Sep 2022Release notes
Open source →- [Android] Use
LifecycleManagerfor modern headless-detection instead of legacy mechanism requiring permissionGET_TASKS.
- [Android] Use
-
1.1.006 Apr 2022Release notes
Open source →- [iOS] Fix type-error when .start() raises an error (#281)
- [Android] Better error-handling when headlessTask is registered incorrectly (#242)
- [Android] Android 12 compatibility: Add new required permission android.permission.SCHEDULE_EXACT_ALARM
-
1.0.324 Nov 2021Release notes
Open source →- [Fixed][Android] Fix typo related to requiredNetworkType, causing null pointer error.
-
1.0.210 Nov 2021Release notes
Open source →- [Changed][Android] Remove deprectated
jcenterrepository. Replaced withmavenCentral.
- [Changed][Android] Remove deprectated
-
1.0.130 Jun 2021Release notes
Open source →- [Changed][Android] Allow multiple calls to .configure to allow re-configuring the fetch task. Existing task will be cancelled and a new periodic fetch task re-scheduled according to new config.
- [Changed][Android] Ignore initial fetch task fired immediately.
- [Changed][Android]
android:exported="false"onBootReceiverto resolve reported security analysis.
-
1.0.009 Jun 2021 -
1.0.0-nullsafety.309 Jun 2021 pre-releaseRelease notes
Open source →- [Fixed][Android] null check in FetchStreamHandler that mEventSink != null
- [Changed][Android] Add new logic block to isMainActivityActive: compare launchActivityName with task.baseActivity.getClassName()
-
1.0.0-nullsafety.201 Apr 2021 pre-releaseRelease notes
Open source →- [Fixed][Android] Flutter 2 broke Android Headless Task with Null-pointer exception.
-
1.0.0-nullsafety.118 Feb 2021 pre-releaseRelease notes
Open source →- [Fixed][Android] Fix
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.transistorsoft.tsbackgroundfetch.BGTask.getTaskId()' on a null object reference
- [Fixed][Android] Fix
-
1.0.0-nullsafety.016 Feb 2021 pre-release -
0.7.309 Jun 2021Nothing published for this version
-
0.7.201 Apr 2021Nothing published for this version
-
0.7.118 Feb 2021Nothing published for this version
-
0.7.011 Feb 2021Release notes
Open source →-
[Added][iOS] Implement two new iOS options for
BackgroundFetch.scheduleTask:bool requiresNetworkConnectivitybool requiresCharging(previously Android-only).
-
[Changed][iOS] Migrate
TSBackgroundFetch.frameworkto new.xcframeworkfor MacCatalyst support with new Apple silcon.
:warning: Breaking Change: Requires
cocoapods >= 1.10+.iOS' new
.xcframeworkrequires cocoapods >= 1.10+:$ pod --version // if < 1.10.0 $ sudo gem install cocoapods- [Added] task-timeout callback.
BackgroundFetch.configurenow accepts a 3rd argumentonTimeoutcallback. This callback will be executed when the operating system has signalled your task has expired before your task has calledBackgroundFetch.finish(taskId). You must stop whatever you're task is doing and executeBackgroundFetch.finish(taskId)immediately.
BackgroundFetch.configure(BackgroundFetchConfig( minimumFetchInterval: 15 ), (String taskId) { // <-- task callback. print("[BackgroundFetch] taskId: $taskId"); BackgroundFetch.finish(taskId); }, (String taskId) { // <-- NEW: task-timeout callback. // This task has exceeded its allowed running-time. You must stop what you're doing immediately finish(taskId) print("[BackgroundFetch] TIMEOUT taskId: $taskId"); BackgroundFetch.finish(taskId); });:warning: [Android] Breaking Change For Android Headless-task
- Since the registered Android headless-task (
BackgroundFetch.registerHeadlessTask) can only receive a single parameter, your headless-task will now receive aHeadlessTask taskinstance rather thanString taskIdin order to differentiate task-timeout events.
OLD
void myBackgroundFetchHeadlessTask(String taskId) async { // <-- OLD: String taskId print("[BackgroundFetch] Headless task: $taskId"); BackgroundFetch.finish(taskId); } BackgroundFetch.registerHeadlessTask(myBackgroundFetchHeadlessTask);NEW
void myBackgroundFetchHeadlessTask(HeadlessTask task) async { // <-- NEW: HeadlessTask now provided. String taskId = task.taskId; // <-- NEW: Get taskId from HeadlessTask bool isTimeout = task.timeout; // <-- NEW: true if this task has timed-out. if (isTimeout) { // This task has exceeded its allowed running-time. You must stop what you're doing immediately finish(taskId) print("[BackgroundFetch] Headless TIMEOUT: $taskId"); BackgroundFetch.finish(taskId); return; } print("[BackgroundFetch] Headless task: $taskId"); BackgroundFetch.finish(taskId); } BackgroundFetch.registerHeadlessTask(myBackgroundFetchHeadlessTask); -
-
0.6.012 Jun 2020Release notes
Open source →- [Fixed][Android]
com.android.tools.build:gradle:4.0.0no longer allows "direct local aar dependencies". The Android Setup now requires a custommaven urlto be added to your app's rootandroid/build.gradle:
allprojects { repositories { google() jcenter() + maven { + // [required] background_fetch + url "${project(':background_fetch').projectDir}/libs" + } } } - [Fixed][Android]
-
0.5.627 May 2020Release notes
Open source →- [Fixed][Android] using
forceAlarmManager: truefails to restart fetch events after reboot. - [Fixed] Android check
wakeLock.isHeld()before executingwakeLock.release().
- [Fixed][Android] using
-
0.5.524 Mar 2020 -
0.5.422 Feb 2020Release notes
Open source →- [Fixed] [Android] Add
@Keepannotation toHeadlessTask.javato prevent minifying this classs in release builds since the SDK uses reflection to find this class.
- [Fixed] [Android] Add
-
0.5.321 Feb 2020Release notes
Open source →- [Fixed] [Android]
stopOnTerminatenot cancelling scheduled job / Alarm when fired task fired after terminate.
- [Fixed] [Android]
-
0.5.220 Feb 2020Release notes
Open source →- [Android] Fix Android NPE in
hasTaskIdfor case where plugin is installed first time in had previous version of plugin
- [Android] Fix Android NPE in
-
0.5.120 Feb 2020Nothing published for this version
-
0.5.010 Feb 2020Release notes
Open source →- [Added] [Android] New option
forceAlarmManagerfor bypassingJobSchedulermechanism in favour ofAlarmManagerfor more precise scheduling task execution. - [Changed] Migrate iOS deprecated "background-fetch" API to new BGTaskScheduler. See new required steps in iOS Setup.
- [Added] Added new
BackgroundFetch.scheduleTaskmethod for scheduling custom "onehot" and periodic tasks in addition to the default fetch-task.
BackgroundFetch.configure(BackgroundFetchConfig( minimumFetchInterval: 15, stopOnTerminate: false ), (String taskId) { // <-- [NEW] taskId provided to Callback print("[BackgroundFetch] taskId: $taskId"); switch(taskId) { case 'foo': // Handle scheduleTask 'foo' break; default: // Handle default fetch event. break; } BackgroundFetch.finish(taskId); // <-- [NEW] Provided taskId to #finish method. }); // This event will end up in Callback provided to #configure above. BackgroundFetch.scheduleTask(TaskConfig( taskId: 'foo', //<-- required delay: 60000, periodic: false )); - [Added] [Android] New option
-
0.4.018 Dec 2019Release notes
Open source →- [Changed] Upgrade to new Flutter Plugin API "V2". Requires flutter sdk version 1.12. See Upgrading pre 1.12 Android Projects
-
0.3.206 Oct 2019Release notes
Open source →- [Fixed] Resolve Android StrictMode violations; typically from accessing SharedPreferences on main-thread.
-
0.3.120 Sep 2019Release notes
Open source →- Fix error
FlutterMain.findBundleAppPath(). The plugin modified a deprecated API for flutter 1.9.1, breaking those on previous flutter versions. Will use deprecated API for now.
- Fix error
-
0.3.018 Sep 2019Release notes
Open source →- Implement Android
JobInfoconstraints. - Fix
NSLogwarnings casting tolong - Default
startOnBoot: truein example
- Implement Android
-
0.2.015 Mar 2019 -
0.1.228 Feb 2019Release notes
Open source →- Fixed bug with setting
jobServiceClassusing a reference toHeadlessJobService.class. This crashes devices < api 21, since Android'sJobServicewasn't available until then. Simply provide the class name as aString.
- Fixed bug with setting
-
0.1.121 Nov 2018 -
0.1.009 Nov 2018 -
0.0.209 Nov 2018Nothing published for this version
-
0.0.109 Nov 2018