transistorsoft / flutter_background_geolocation

Sophisticated, battery-conscious background-geolocation & geofencing with motion-detection
https://www.transistorsoft.com/shop/products/flutter-background-geolocation
Other
647 stars 239 forks source link

Question: What is the most aggressive config to get most frequent locations (I don't care about the battery life)? #487

Closed draganjovanovic1 closed 3 years ago

draganjovanovic1 commented 3 years ago

Your Environment

Environment irrelevant, just a question.

I searched through the properties and docs and found that this set of properties might affect:

        activityRecognitionInterval: 0,
        stopOnStationary: false,
        isMoving: true,
        stationaryRadius: 25,
        reset: true, // if I understood correctly without this config is not forced each time on ready but since I have some dynamically loaded properties from the remote config should I use this?

Expected Behavior

## Actual Behavior

iOS stationary geofence could lead to issues as it takes a while to detect motion sometimes leading in several hundred of meters without driver's location. This is by the docs and reflects what is written there but I am curious if I can make the tracking lib be more aggressive.

Context

I am using the lib as a part of the driver app so the most precise and frequent location is required regardless of the battery optimization.

Debug logs

Logs ``` PASTE_YOUR_LOGS_HERE ```
christocracy commented 3 years ago

If the driver wants to initiate tracking, you can offer a UI button (eg: [Start]) where you execute BackgroundGeolocation.changePace(true) to manually place the plugin into the moving state.

draganjovanovic1 commented 3 years ago

My scenario is to start tracking, with the config above, as soon as driver logs in the app and the idea is to track driver as long as he is logged in the app even if it is in the background. Tracking is being stopped on logout. There should be no manual action by the driver.

My issue is that the library sometimes takes too long to react on a movement, especially on iOS which is described and understood. The library has the idea to be energy efficient and it is perfectly valid but not for my use case so I wanted to check if there are any additional flags which can make it more aggressive in terms of tracking regardless of the battery life.

Thanks and happy holidays!

christocracy commented 3 years ago