Test new completely rewritten Traccar Client app

Hrothulf6 days ago

Thank you Anton, that's very helpful, it makes perfect sense to use the IMU and manage two states: Moving and Stationary and only determine location and / or send updates when moving.

Even though I had set the accuracy to high, I had the impression that the updates were infrequent / course using Location=20m and Frequency=300s, but maybe I confused myself ; ) I will test again; I might take a few different Android devices with different settings with me on the same itinerary for some more controlled experiments and see how they compare.

Anton Tananaev6 days ago

I believe there still could be delays when Android goes into deep sleep mode. On some devices there's an option to "not optimize" some apps for battery usage. For some reason can't find that setting on my Pixel 8, but I'm sure it's there somewhere.

Hrothulf6 days ago

On your Pixel 8 Pro, you can manage battery optimization settings for individual apps through the following steps:

  1. Open Settings.
  2. Tap Apps.
  3. Select See all apps.
  4. Choose the app you want to adjust.
  5. Tap App battery usage.
  6. Tap Allow background usage.
  7. You'll be presented with options: Optimized, Restricted, and Unrestricted. Select Unrestricted to prevent the app from being affected by battery optimization features.
Hrothulf6 days ago

Anton, I was reviewing the documentation you sent. Very interesting. Still trying to address the course logging...

Two questions:

  1. In the Traccar Client app, frequency is registered in seconds? It doesn't mention on the screen, and in the library you mentioned they claim it is milliseconds. Chatgpt suggests that frequencies of 1000ms - 5000ms can be reasonable depending on use case.
  2. Just brainstorming, and maybe you have this implemented already, but I was wondering if it would be good / convenient / useful to use the detected activity to select different settings, e.g.:
BackgroundGeolocation.onActivityChange((ActivityChangeEvent event) {
  String type = event.activity;  // e.g. 'still', 'on_foot', 'in_vehicle'
  print('[ActivityChange] $type');

  if (type == 'still') {
    BackgroundGeolocation.setConfig(Config(
      distanceFilter: 100,
      locationUpdateInterval: 15000,
      fastestLocationUpdateInterval: 10000
    ));
  } else if (type == 'walking' || type == 'on_foot') {
    BackgroundGeolocation.setConfig(Config(
      distanceFilter: 10,
      locationUpdateInterval: 5000,
      fastestLocationUpdateInterval: 2000
    ));
  } else if (type == 'running') {
    BackgroundGeolocation.setConfig(Config(
      distanceFilter: 20,
      locationUpdateInterval: 3000,
      fastestLocationUpdateInterval: 1500
    ));
  } else if (type == 'on_bicycle') {
    BackgroundGeolocation.setConfig(Config(
      distanceFilter: 25,
      locationUpdateInterval: 4000,
      fastestLocationUpdateInterval: 2000
    ));
  } else if (type == 'in_vehicle') {
    BackgroundGeolocation.setConfig(Config(
      distanceFilter: 50,
      locationUpdateInterval: 10000,
      fastestLocationUpdateInterval: 5000
    ));
  }
});

The values could come from some settings (default or configurable).
It's just a thought since you were soliciting feedback.

Anton Tananaev6 days ago
  1. We convert from seconds (what you enter) to milliseconds (geolocation SDK) in the app.
  2. We don't have this yet, but this is the type of thing we would want to build in the future. That's why we're rewriting the app with this SDK.
Hrothulf6 days ago

Excellent, thanks for your feedback.