PackageTrack
Sign in Get early access

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 2026
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 58
  1. 1.7.0 25 May 2026
    Release notes
    • [iOS] Adopt FlutterSceneLifeCycleDelegate for Flutter 3.41 UIScene lifecycle support.
    • [Changed] Bump minimum Flutter SDK constraint to >=3.38.0.
    Open source →
  2. 1.6.2 20 Apr 2026
    Release notes
    • [Android] Fix MissingPluginException on com.transistorsoft/flutter_background_fetch/methods after app relaunch when a foreground service kept the process alive post-termination. HeadlessTask now destroys its background FlutterEngine when the main Activity re-attaches, and BackgroundFetchModule tracks method channels per-BinaryMessenger so destroying one engine (e.g. a sibling plugin's headless isolate) no longer strips the handler from another engine's channel.
    Open source →
  3. 1.6.1 15 Apr 2026
    Release notes
    • Update native libs for 4.1.0
    • [iOS] Migrate /example to Flutter 3.41 UIScene lifecycle (adopt FlutterImplicitEngineDelegate, register plugins via didInitializeImplicitFlutterEngine:, add UIApplicationSceneManifest with FlutterSceneDelegate). TSBackgroundFetch 4.1's +load auto-registers BGTask launch handlers before the BGTaskScheduler deadline, which is required for UIScene apps where the plugin's application:didFinishLaunchingWithOptions: is delivered too late via Flutter's scene fallback.
    Open source →
  4. 1.6.0 14 Apr 2026
    Release notes
    • [Changed] Renamed HeadlessTask class to HeadlessEvent to align with TypeScript API. A typedef HeadlessTask = HeadlessEvent alias is provided for backwards compatibility.
    • [Changed] Simplified README with links to new Documentation Site.
    Open source →
  5. 1.5.1 26 Mar 2026
    Release notes
    • 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.
    Open source →
  6. 1.5.0 09 Nov 2025
    Release notes
    • 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 custom maven url in the root build.gradle.
    • See the Setup Guides for both iOS and Android (they have changed from previous versions).
    Open source →
  7. 1.4.0 28 Jul 2025
    Release notes
    • [iOS] Add Swift Package Manager support
    Open source →
  8. 1.3.8 20 Mar 2025
    Release notes
    • [Android] Update gradle config. Default compileSdkVersion 34
    Open source →
  9. 1.3.7 09 Sep 2024
    Release notes

    Merge branch 'remove-unused-imports'

    Open source →
    Release notes
    • [Android] Removed unused import related to Flutter V1 embedding.
    Open source →
  10. 1.3.6 06 Sep 2024
    Release notes

    Merge branch 'update-android-dependencies'

    Open source →
    Release notes
    • [Android] Remove unrequired dependency appcompat.
    • [Android] Bump default androidx.lifecycle:lifecycle-runtime version to 2.7.0.
    • [Android] Add @NonNull annotations to flutter plugin methods.
    • [Android] Enable multidex in Android /example.
    Open source →
  11. 1.3.5 27 May 2024
    Release notes

    Merge branch 'release-1.3.5'

    Open source →
    Release notes
    • Update analysis_options.yaml for pub.dev. There are no code changes from 1.3.4.
    Open source →
  12. 1.3.4 03 May 2024
    Release notes
    • Change return-type of BackgroundFetch.finish from void to Future<void>.
    Open source →
  13. 1.3.3 22 Apr 2024
    Release notes

    Merge branch 'codesign'

    Open source →
    Release notes
    • [iOS] Code-sign TSBackgroundFetch.xcframework with new Apple Organization (9224-2932 Quebec Inc) certificate.
    Open source →
  14. 1.3.2 27 Mar 2024
    Release notes

    Merge branch 'PrivacyInfo'

    Open source →
    Release notes
    • [iOS] codesign TSBackgroundFetch.xcframework.
    • [iOS] Add PrivacyInfo.xcprivacy into .podfile config.
    Open source →
  15. 1.3.1 20 Mar 2024
    Release notes
    • [iOS] Move PrivacyInfo -> TSBackgroundFetch.xcframework.
    Open source →
  16. 1.3.0 19 Mar 2024
    Release notes

    Merge branch 'PrivacyInfo'

    Open source →
    Release notes
    Open source →
  17. 1.2.4 07 Mar 2024
    Release notes

    Merge branch 'release-1.2.4'

    Open source →
    Release notes
    • [iOS] Remove reference to symbol BGHealthResearchTask for now
    Open source →
  18. 1.2.3 29 Feb 2024
    Release notes
    • [iOS] ensure scheduleTask callback is executed on main-thread.
    • [Android] Update Android Setup Instructions for flutter >= 3.19.0 (New Android Architecture).
    Open source →
  19. 1.2.2 10 Jan 2024
    Release notes
    • [iOS] Only allow registration of BGProcessingTasks (Permitted background task scheduler identifiers) in Info.plist which are prefixed with com.transistorsoft. Any other task identifier will be ignored.
    • [Android] Remove deprecated registerWith V1 flutter plugin architecture.
    Open source →
  20. 1.2.1 20 Aug 2023
    Release notes
    • [Android] Detect and dispose of duplicate events. Android JobService has a bug for devices running <= Android M where multiple backgrou nd-fetch events could fire within the same second.
    Open source →
  21. 1.2.0 31 Jul 2023
    Release notes
    • [Android] Android 14 (SDK 34) support..
    • [Android] Android 14 support: When using forceAlarmManager: true, you must now optionally add the permission android.permission.SCHEDULE_EXACT_ALARM to your AndroidManifest to schedule exact alarms. Otherwise AlarmManager will use in-exact alarms. :open_file_folder: AndroidManifest. NOTE You must include the permission exactly as-shown with android: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 run with screen off where plugin incorrectly detects the app is headless.
    Open source →
  22. 1.1.6 03 May 2023
    Release notes
    • [Android] Gradle v8 now requires namespace attribute in gradle files.
    Open source →
  23. 1.1.5 16 Feb 2023
    Release notes
    • [Android] Fix NPE in mEventChannelTask in certain situations. See #322.
    Open source →
  24. 1.1.4 28 Jan 2023
    Release notes
    • [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.
    Open source →
  25. 1.1.3 10 Jan 2023
    Release notes
    • [Android] Fix error FlutterJNI was detached from native C++ when Android back button is pressed. In this case, Flutter detaches the MainActivity from the app and headless-mode was not being detected.
    Open source →
  26. 1.1.2 27 Oct 2022
    Release notes
    • [Android] add @pragma('vm:entry-point') to lib's _headlessCallbackDispatcher, required for release builds on Flutter >= 3.3.0.
    Open source →
  27. 1.1.1 30 Sep 2022
    Release notes
    • [Android] Use LifecycleManager for modern headless-detection instead of legacy mechanism requiring permission GET_TASKS.
    Open source →
  28. 1.1.0 06 Apr 2022
    Release notes
    • [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
    Open source →
  29. 1.0.3 24 Nov 2021
    Release notes
    • [Fixed][Android] Fix typo related to requiredNetworkType, causing null pointer error.
    Open source →
  30. 1.0.2 10 Nov 2021
    Release notes
    • [Changed][Android] Remove deprectated jcenter repository. Replaced with mavenCentral.
    Open source →
  31. 1.0.1 30 Jun 2021
    Release notes
    • [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" on BootReceiver to resolve reported security analysis.
    Open source →
  32. 1.0.0 09 Jun 2021
    Release notes
    • Release 1.0.0-nullsafety.3 as 1.0.0
    Open source →
  33. 1.0.0-nullsafety.3 09 Jun 2021 pre-release
    Release notes
    • [Fixed][Android] null check in FetchStreamHandler that mEventSink != null
    • [Changed][Android] Add new logic block to isMainActivityActive: compare launchActivityName with task.baseActivity.getClassName()
    Open source →
  34. 1.0.0-nullsafety.2 01 Apr 2021 pre-release
    Release notes
    • [Fixed][Android] Flutter 2 broke Android Headless Task with Null-pointer exception.
    Open source →
  35. 1.0.0-nullsafety.1 18 Feb 2021 pre-release
    Release notes
    • [Fixed][Android] Fix java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.transistorsoft.tsbackgroundfetch.BGTask.getTaskId()' on a null object reference
    Open source →
  36. 1.0.0-nullsafety.0 16 Feb 2021 pre-release
    Release notes
    • [Changed] Implement null-safety (Thanks to @GinoTerlouw).
    Open source →
  37. 0.7.3 09 Jun 2021

    Nothing published for this version

  38. 0.7.2 01 Apr 2021

    Nothing published for this version

  39. 0.7.1 18 Feb 2021

    Nothing published for this version

  40. 0.7.0 11 Feb 2021
    Release notes
    • [Added][iOS] Implement two new iOS options for BackgroundFetch.scheduleTask:

      • bool requiresNetworkConnectivity
      • bool requiresCharging (previously Android-only).
    • [Changed][iOS] Migrate TSBackgroundFetch.framework to new .xcframework for MacCatalyst support with new Apple silcon.

    :warning: Breaking Change: Requires cocoapods >= 1.10+.

    iOS' new .xcframework requires cocoapods >= 1.10+:

    $ pod --version
    // if < 1.10.0
    $ sudo gem install cocoapods
    
    • [Added] task-timeout callback. BackgroundFetch.configure now accepts a 3rd argument onTimeout callback. This callback will be executed when the operating system has signalled your task has expired before your task has called BackgroundFetch.finish(taskId). You must stop whatever you're task is doing and execute BackgroundFetch.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 a HeadlessTask task instance rather than String taskId in 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);
    
    Open source →
  41. 0.6.0 12 Jun 2020
    Release notes
    • [Fixed][Android] com.android.tools.build:gradle:4.0.0 no longer allows "direct local aar dependencies". The Android Setup now requires a custom maven url to be added to your app's root android/build.gradle:
    allprojects {
        repositories {
            google()
            jcenter()
    +       maven {
    +           // [required] background_fetch
    +           url "${project(':background_fetch').projectDir}/libs"
    +       }
        }
    }
    
    Open source →
  42. 0.5.6 27 May 2020
    Release notes
    • [Fixed][Android] using forceAlarmManager: true fails to restart fetch events after reboot.
    • [Fixed] Android check wakeLock.isHeld() before executing wakeLock.release().
    Open source →
  43. 0.5.5 24 Mar 2020
    Release notes
    • [Fixed] [iOS] bug with start plugin after executing stop.
    Open source →
  44. 0.5.4 22 Feb 2020
    Release notes
    • [Fixed] [Android] Add @Keep annotation to HeadlessTask.java to prevent minifying this classs in release builds since the SDK uses reflection to find this class.
    Open source →
  45. 0.5.3 21 Feb 2020
    Release notes
    • [Fixed] [Android] stopOnTerminate not cancelling scheduled job / Alarm when fired task fired after terminate.
    Open source →
  46. 0.5.2 20 Feb 2020
    Release notes
    • [Android] Fix Android NPE in hasTaskId for case where plugin is installed first time in had previous version of plugin
    Open source →
  47. 0.5.1 20 Feb 2020

    Nothing published for this version

  48. 0.5.0 10 Feb 2020
    Release notes
    • [Added] [Android] New option forceAlarmManager for bypassing JobScheduler mechanism in favour of AlarmManager for 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.scheduleTask method 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  
    ));
    
    Open source →
  49. 0.4.0 18 Dec 2019
    Release notes
    Open source →
  50. 0.3.2 06 Oct 2019
    Release notes
    • [Fixed] Resolve Android StrictMode violations; typically from accessing SharedPreferences on main-thread.
    Open source →
  51. 0.3.1 20 Sep 2019
    Release notes
    • 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.
    Open source →
  52. 0.3.0 18 Sep 2019
    Release notes
    • Implement Android JobInfo constraints.
    • Fix NSLog warnings casting to long
    • Default startOnBoot: true in example
    Open source →
  53. 0.2.0 15 Mar 2019
    Release notes
    • Use AndroidX.
    Open source →
  54. 0.1.2 28 Feb 2019
    Release notes
    • Fixed bug with setting jobServiceClass using a reference to HeadlessJobService.class. This crashes devices < api 21, since Android's JobService wasn't available until then. Simply provide the class name as a String.
    Open source →
  55. 0.1.1 21 Nov 2018
    Release notes
    • Fixed issue with Android headless config.
    Open source →
  56. 0.1.0 09 Nov 2018
    Release notes
    • First working implementation
    Open source →
  57. 0.0.2 09 Nov 2018

    Nothing published for this version

  58. 0.0.1 09 Nov 2018
    Release notes
    • First working implementation
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive