Skip to content

[Help Wanted]: Update config does not update while running ? #1682

@harwindersingh-maker

Description

@harwindersingh-maker

Required Reading

  • Confirmed

Plugin Version

flutter_background_geolocation: ^5.1.2

Mobile operating-system(s)

  • iOS
  • Android

Device Manufacturer(s) and Model(s)

samsung SM-M336BU

Device operating-systems(s)

Android 14

What do you require assistance about?

After starting tracking with the initial location interval, location updates are received correctly. However, after updating the location interval dynamically, the plugin still continues using the previous interval instead of applying the updated one immediately.
(updated while the user is in actively moving)

[Optional] Plugin Code and/or Config

static Future<void> updateConfig(int intervalMinutes) async {
  
    await bg.BackgroundGeolocation.setConfig(
      bg.Config(
        heartbeatInterval: intervalMinutes * 60, // seconds
        locationUpdateInterval: Duration(
          minutes: intervalMinutes,
        ).inMilliseconds,
        fastestLocationUpdateInterval: Duration(
          minutes: intervalMinutes,
        ).inMilliseconds, // ms
      ),
    );

[Optional] Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions