Skip to content

[Bug]: BackgroundFetch.status not return correct value #403

Open
@gamestap99

Description

@gamestap99

Required Reading

  • Confirmed

Plugin Version

flutter_background_geolocation: ^4.13.7

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.1, on macOS 15.5 24F74 darwin-x64, locale en-VN)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.3)
[!] Android Studio (version unknown)
    ✗ Unable to determine Android Studio version.
[✓] Android Studio (version 2024.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2025.1.3)
[✓] Connected device (1 available)
[✓] Network resources

! Doctor found issues in 1 category.

Mobile operating-system(s)

  • iOS
  • Android

Device Manufacturer(s) and Model(s)

iPhone 13 pro max

Device operating-systems(s)

ios 17.5

What happened?

https://res.cloudinary.com/dpkfft6mq/image/upload/v1752123476/z6787365387180_9f1d6786c54de5edffea9d5ad422819c_zuinu3.jpg

BackgroundFetch.status is always returning 1 https://pub.dev/documentation/background_fetch/latest/background_fetch/BackgroundFetch/STATUS_DENIED-constant.html but my background app settings are definitely turned on, According to the documentation, this should result in 2 https://pub.dev/documentation/background_fetch/latest/background_fetch/BackgroundFetch/STATUS_AVAILABLE-constant.html
What could be the reason for this discrepancy?

Plugin Code and/or Config

BackgroundFetchConfig(
      minimumFetchInterval: 20,
      startOnBoot: true,
      stopOnTerminate: false,
      enableHeadless: true,
      forceAlarmManager: true,
      requiresStorageNotLow: false,
      requiresBatteryNotLow: false,
      requiresCharging: false,
      requiresDeviceIdle: false,
      requiredNetworkType: NetworkType.NONE,
    )

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions