transistorsoft/flutter_background_geolocation

Automatically turn stationary state when the application has just been closed

Closed this issue · 2 comments

Hello, I've been using your plugin for six months now, it's wonderful, thank you. The problem is that when the application goes to the terminated state, the plugin seems to automatically change pace to false and sets the stationary radius, even if at the time of closing the application the person was moving and there was a moving state. How can I disable this property, or how can I beat it?

Your Environment

  • Plugin version: 4.16.2
  • Platform: iOS
  • OS version: >15.6
  • Device manufacturer / model: iPhone
  • Flutter info (flutter doctor):
  • Plugin config:
bg.Config(
        maxRecordsToPersist: 1,
        stopTimeout: 20,
        disableElasticity: true,
        stationaryRadius: 50,
        desiredAccuracy: bg.Config.DESIRED_ACCURACY_NAVIGATION,
        activityRecognitionInterval: 0,
        distanceFilter: 15.0,
        reset: false,
        url: Url,
        stopOnTerminate: false,
        startOnBoot: true,
        logLevel: bg.Config.LOG_LEVEL_ERROR);

Expected Behavior

When you close the application, if the plugin is in the moving state, then it should stay in it.

Actual Behavior

When you close the application, if the plugin is in the moving state, it going automatically to stationary.

Steps to Reproduce

Context

Debug logs

Logs
PASTE_YOUR_LOGS_HERE

It is crucial for the plug-in to do that at terminate since it allows the plug-in to be re-launched automatically by the os once the device moves about 200 meters after terminate.

when an iOS app is terminated, the OS completely removes your app from memory. It does not continue to operate “headless”, like Android.

It is crucial for the plug-in to do that at terminate since it allows the plug-in to be re-launched automatically by the os once the device moves about 200 meters after terminate.

when an iOS app is terminated, the OS completely removes your app from memory. It does not continue to operate “headless”, like Android.

Thanks)