flutter-plugins icon indicating copy to clipboard operation
flutter-plugins copied to clipboard

[carp_background_location:4.0.0] background_locator_2 is also no longer maintained

Open udiedrichsen opened this issue 1 year ago • 0 comments

Device / Emulator and OS

Please complete the following information for each phone and/or emulator you're experiencing this bug on:

  • Device: iPhone 12 Pro Max
  • OS: iOS 18 Beta

NB: Bugs pertaining to old devices/OS versions will likely not be fixed.

Ok, I am using the 18 beta already but it we be live very soon.

Describe the bug

Its not really a bug, but a hint:

** https://github.com/Yukams/background_locator_fixed**

This project is no longer actively maintained. If you are interested in becoming a maintainer, please open an issue or contact me directly !

To Reproduce

Check the github repo.

Their are already a big number of open issues.

Expected behavior

Evaluate other packages for background location.

Actual behavior

I got problems when using the mobility_feature package. For the first run it works well, but if the background location service already running it will not receive new features due problems with the background location service.

As a workaround I change the carp_background_location.LocationManager.start method for me:

  Future<bool> start() async {
    if (await isRunning) {
      await stop();
    }

    await BackgroundLocator.initialize();

    await BackgroundLocator.registerLocationUpdate(
      LocationCallbackHandler.callback,
      initCallback: LocationCallbackHandler.initCallback,
      disposeCallback: LocationCallbackHandler.disposeCallback,
      autoStop: false,
      androidSettings: AndroidSettings(
          accuracy: _accuracy,
          interval: _interval,
          distanceFilter: _distanceFilter,
          androidNotificationSettings: AndroidNotificationSettings(
            notificationChannelName: _channelName,
            notificationTitle: _notificationTitle,
            notificationMsg: _notificationMsg,
            notificationBigMsg: _notificationBigMsg,
          )),
      iosSettings: IOSSettings(
        accuracy: _accuracy,
        distanceFilter: _distanceFilter,
      ),
    );

    return await isRunning;
  }

If its already running I call stop and restart it. Not sure if this is a good way, but it works :-)

Screenshots

Flutter doctor

Additional information

I really like your packages, good job 💯

udiedrichsen avatar Aug 20 '24 08:08 udiedrichsen