flutter_background_geolocation icon indicating copy to clipboard operation
flutter_background_geolocation copied to clipboard

Background isnt saving any data to SQLite

Open bujdy opened this issue 4 years ago • 14 comments

Your Environment

  • Plugin version: 4.3.0

  • Platform: Android

  • OS version: Android version 11

  • Device manufacturer / model: Pixel 3 API 30

  • Flutter info (flutter doctor):

  • Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19042.1466], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [√] Chrome - develop for the web [√] Android Studio (version 2021.1) [√] VS Code (version 1.63.2) [√] Connected device (3 available)

• No issues found!

  • Plugin config:
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter_background_geolocation/flutter_background_geolocation.dart'
    as bg;

////
// For pretty-printing locations as JSON
// @see _onLocation
//
import 'dart:convert';

JsonEncoder encoder = new JsonEncoder.withIndent("     ");

class TrackingDetailsView extends StatelessWidget {
  static const String NAME = 'hello_world';

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return HelloWorldPage();
  }
}

class HelloWorldPage extends StatefulWidget {
  @override
  _HelloWorldPageState createState() => new _HelloWorldPageState();
}

class _HelloWorldPageState extends State<HelloWorldPage> {
  late bool _isMoving;
  late bool _enabled;
  late String _motionActivity;
  late String _odometer;
  late String _content;

  @override
  void initState() {
    super.initState();
    _content = "    Enable the switch to begin tracking.";
    _isMoving = false;
    _enabled = false;
    _content = '';
    _motionActivity = 'UNKNOWN';
    _odometer = '0';
    _initPlatformState();
  }

  Future<Null> _initPlatformState() async {
    // Fetch a Transistor demo server Authorization token for tracker.transistorsoft.com.

    // 1.  Listen to events (See docs for all 12 available events).
    bg.BackgroundGeolocation.onLocation(_onLocation, _onLocationError);
    bg.BackgroundGeolocation.onMotionChange(_onMotionChange);
    bg.BackgroundGeolocation.onActivityChange(_onActivityChange);
    bg.BackgroundGeolocation.onProviderChange(_onProviderChange);
    bg.BackgroundGeolocation.onConnectivityChange(_onConnectivityChange);
    bg.BackgroundGeolocation.onHttp(_onHttp);
    bg.BackgroundGeolocation.onAuthorization(_onAuthorization);

    // 2.  Configure the plugin
    bg.BackgroundGeolocation.ready(bg.Config(
            reset: true,
            debug: true,
            autoSync: false,
            batchSync: true,
            logLevel: bg.Config.LOG_LEVEL_VERBOSE,
            desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH,
            distanceFilter: 10.0,
            backgroundPermissionRationale: bg.PermissionRationale(
                title:
                    "Allow {applicationName} to access this device's location even when the app is closed or not in use.",
                message:
                    "This app collects location data to enable recording your trips to work and calculate distance-travelled.",
                positiveAction: 'Change to "{backgroundPermissionOptionLabel}"',
                negativeAction: 'Cancel'),
            authorization: bg.Authorization(
                // <-- demo server authenticates with JWT
                strategy: bg.Authorization.STRATEGY_JWT,
                refreshPayload: {'refresh_token': '{refreshToken}'}),
            stopOnTerminate: false,
            startOnBoot: true))
        .then((bg.State state) {
      print("[ready] ${state.toMap()}");
      setState(() {
        _enabled = state.enabled;
        _isMoving = state.isMoving!;
      });
    }).catchError((error) {
      print('[ready] ERROR: $error');
    });
  }

  void _onClickEnable(enabled) {
    if (enabled) {
      // Reset odometer.
      bg.BackgroundGeolocation.start().then((bg.State state) {
        print('[start] success $state');
        setState(() {
          _enabled = state.enabled;
          _isMoving = state.isMoving!;
        });
      }).catchError((error) {
        print('[start] ERROR: $error');
      });
    } else {
      bg.BackgroundGeolocation.stop().then((bg.State state) {
        print('[stop] success: $state');

        setState(() {
          _enabled = state.enabled;
          _isMoving = state.isMoving!;
        });
      });
    }
  }

  // Manually toggle the tracking state:  moving vs stationary
  void _onClickChangePace() {
    setState(() {
      _isMoving = !_isMoving;
    });
    print("[onClickChangePace] -> $_isMoving");

    bg.BackgroundGeolocation.changePace(_isMoving).then((bool isMoving) {
      print('[changePace] success $isMoving');
    }).catchError((e) {
      print('[changePace] ERROR: ' + e.code.toString());
    });
  }

  Future<void> _onGetLocations() async {
    List<dynamic> log = await bg.BackgroundGeolocation.locations;
    showDialog<void>(
      context: context,
      builder: (BuildContext context) {
        return AlertDialog(
          content:
              SingleChildScrollView(child: SelectableText(json.encode(log))),
        );
      },
    );
  }

  Future<void> _onDestroyLocations() async {
    await bg.BackgroundGeolocation.destroyLocations();
  }

  // Manually fetch the current position.
  void _onClickGetCurrentPosition() {
    bg.BackgroundGeolocation.getCurrentPosition(
            persist: true, // <-- do persist this location
            desiredAccuracy: 0, // <-- desire best possible accuracy
            timeout: 30, // <-- wait 30s before giving up.
            samples: 3 // <-- sample 3 location before selecting best.
            )
        .then((bg.Location location) {
      print('[getCurrentPosition] - $location');
    }).catchError((error) {
      print('[getCurrentPosition] ERROR: $error');
    });
  }

  // Go back to HomeApp.

  ////
  // Event handlers
  //

  void _onLocation(bg.Location location) {
    print('[location] - $location');

    String odometerKM = (location.odometer / 1000.0).toStringAsFixed(1);

    setState(() {
      _content = encoder.convert(location.toMap());
      _odometer = odometerKM;
    });
  }

  void _onLocationError(bg.LocationError error) {
    print('[location] ERROR - $error');
  }

  void _onMotionChange(bg.Location location) {
    print('[motionchange] - $location');
  }

  void _onActivityChange(bg.ActivityChangeEvent event) {
    print('[activitychange] - $event');
    setState(() {
      _motionActivity = event.activity;
    });
  }

  void _onHttp(bg.HttpEvent event) async {
    print('[${bg.Event.HTTP}] - $event');
  }

  void _onAuthorization(bg.AuthorizationEvent event) async {
    print('[${bg.Event.AUTHORIZATION}] = $event');
  }

  void _onProviderChange(bg.ProviderChangeEvent event) {
    print('$event');

    setState(() {
      _content = encoder.convert(event.toMap());
    });
  }

  void _onConnectivityChange(bg.ConnectivityChangeEvent event) {
    print('$event');
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('BG Geo'),
        backgroundColor: AppColors.black,
        actions: <Widget>[
          Switch(
              value: _enabled,
              activeColor: AppColors.white,
              onChanged: _onClickEnable),
        ],
      ),
      body: SingleChildScrollView(
          child: Column(
        children: [
          Text('$_content'),
          Container(
              padding: const EdgeInsets.only(left: 5.0, right: 5.0),
              child: Row(
                  mainAxisSize: MainAxisSize.max,
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: <Widget>[
                    IconButton(
                      icon: Icon(Icons.gps_fixed),
                      onPressed: _onClickGetCurrentPosition,
                    ),
                    //Text('$_motionActivity · $_odometer km'),
                    MaterialButton(
                      minWidth: 50.0,
                      child: Text("Get JSON"),
                      onPressed: _onGetLocations,
                      color: Colors.blue,
                    ),
                    MaterialButton(
                      minWidth: 50.0,
                      child: Text("Clear SQLite"),
                      onPressed: _onDestroyLocations,
                      color: Colors.red,
                    ),
                    MaterialButton(
                        minWidth: 50.0,
                        child: Icon(
                            (_isMoving) ? Icons.pause : Icons.play_arrow,
                            color: Colors.white),
                        color: (_isMoving) ? Colors.red : Colors.green,
                        onPressed: _onClickChangePace)
                  ]))
        ],
      )),
    );
  }
}

Expected Behavior

So in method _onGetLocations i am getting all locations from SQLite database, and i am printing them on screen. I want to see every location in json there (even if app is minimized or terminated). So everything is being stored in sqllite, i am not posting anything to server.

Actual Behavior

Problem is when i minimize app or terminate it it wont gather any data to SQLlite so no data is printed during that time.

Context

I tried to change config menu, also tried to remove or add headless (i dont really understand this concept)

Debug logs

Logs
01-28 11:20:09.014 INFO [LoggerFacade$a a] 
  ✅  Google Play Services: connected (version code:12451000)
01-28 11:20:09.027 INFO [LoggerFacade$a a] 
  🎾  Start monitoring location-provider changes
01-28 11:20:09.028 DEBUG [LoggerFacade$a a] 
  🔴  Cleared callbacks
01-28 11:20:09.050 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/location
01-28 11:20:09.051 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/motionchange
01-28 11:20:09.068 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/activitychange
01-28 11:20:09.070 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/geofenceschange
01-28 11:20:09.071 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/geofence
01-28 11:20:09.071 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/heartbeat
01-28 11:20:09.088 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/http
01-28 11:20:09.090 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/schedule
01-28 11:20:09.106 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/connectivitychange
01-28 11:20:09.106 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/enabledchange
01-28 11:20:09.122 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/providerchange
01-28 11:20:09.134 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/powersavechange
01-28 11:20:09.134 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/notificationaction
01-28 11:20:09.202 DEBUG [LoggerFacade$a a] com.transistorsoft/flutter_background_geolocation/events/authorization
01-28 11:20:09.202 DEBUG [LoggerFacade$a a] ℹ️   Persist config, dirty: [headlessJobService]
01-28 11:20:09.203 DEBUG [LoggerFacade$a a] CREATE TABLE IF NOT EXISTS locations (id INTEGER PRIMARY KEY AUTOINCREMENT, uuid TEXT NOT NULL DEFAULT '', timestamp TEXT, json TEXT, data BLOB, encrypted BOOLEAN NOT NULL DEFAULT 0, locked BOOLEAN NOT NULL DEFAULT 0);
01-28 11:20:09.226 DEBUG [LoggerFacade$a a] CREATE TABLE IF NOT EXISTS geofences (id INTEGER PRIMARY KEY AUTOINCREMENT, identifier TEXT NOT NULL UNIQUE, latitude DOUBLE NOT NULL, sin_latitude DOUBLE NOT NULL, cos_latitude DOUBLE NOT NULL, longitude DOUBLE NOT NULL, sin_longitude DOUBLE NOT NULL, cos_longitude DOUBLE NOT NULL, radius DOUBLE NOT NULL, notifyOnEntry BOOLEAN NOT NULL DEFAULT 0, notifyOnExit BOOLEAN NOT NULL DEFAULT 0, notifyOnDwell BOOLEAN NOT NULL DEFAULT 0, loiteringDelay INTEGER NOT NULL DEFAULT 0, extras TEXT);
01-28 11:20:09.230 DEBUG [LoggerFacade$a a] 
  ℹ️  PRUNE -1 days
01-28 11:20:19.944 DEBUG [StreamHandler onListen] location
01-28 11:20:19.946 DEBUG [StreamHandler onListen] motionchange
01-28 11:20:19.947 DEBUG [StreamHandler onListen] activitychange
01-28 11:20:19.948 DEBUG [StreamHandler onListen] providerchange
01-28 11:20:19.948 DEBUG [StreamHandler onListen] connectivitychange
01-28 11:20:19.949 DEBUG [StreamHandler onListen] http
01-28 11:20:19.950 DEBUG [StreamHandler onListen] authorization
01-28 11:20:19.974 DEBUG [TSConfig d] ℹ️   Persist config, dirty: [authorization, authorization.strategy, authorization.refreshPayload, autoSync, backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, backgroundPermissionRationale.negativeAction, batchSync, debug, desiredAccuracy, enableHeadless, logLevel, startOnBoot, stopOnTerminate]
01-28 11:20:20.109 WARN [BackgroundGeolocationModule ready] 
  ⚠️  #ready already called.  Redirecting to #setConfig
01-28 11:20:20.151 WARN [BackgroundGeolocationModule ready] 
  ⚠️  #ready already called.  Redirecting to #setConfig
01-28 11:20:20.192 WARN [BackgroundGeolocationModule ready] 
  ⚠️  #ready already called.  Redirecting to #setConfig
01-28 11:20:20.236 WARN [BackgroundGeolocationModule ready] 
  ⚠️  #ready already called.  Redirecting to #setConfig
01-28 11:20:22.796 INFO [c g] 
  🔵  LocationAuthorization: Requesting Background permission
01-28 11:20:24.713 INFO [c$k onPermissionGranted] 
  ✅  LocationAuthorization: Permission granted
01-28 11:20:24.771 INFO [c e] 
  🔵  Should show backgroundPermissionRationale? false
01-28 11:20:25.941 INFO [ActivityRecognitionService b] 
  🎾  Start motion-activity updates
01-28 11:20:25.976 DEBUG [HttpService startMonitoringConnectivityChanges] 
  🎾  Start monitoring connectivity changes
01-28 11:20:25.986 DEBUG [TSLocationManagerActivity execute] locationsettings
01-28 11:20:25.990 DEBUG [a c] 
  🎾  Start monitoring powersave changes
01-28 11:20:25.997 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-28 11:20:26.005 DEBUG [HttpService a] 
╔═════════════════════════════════════════════
║ 📶  Connectivity change: connected? true
╠═════════════════════════════════════════════

01-28 11:20:26.011 INFO [HeartbeatService c] 
  🔴  Stop heartbeat
01-28 11:20:26.020 INFO [TrackingService a] 
  🔵  setPace: false → false
01-28 11:20:26.020 INFO [c h] 
  🔵  LocationAuthorization: Requesting permission
01-28 11:20:26.054 INFO [c$k onPermissionGranted] 
  ✅  LocationAuthorization: Permission granted
01-28 11:20:26.124 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588)
01-28 11:20:26.163 DEBUG [TSLocationManagerActivity stop] eventCount: 0
01-28 11:20:26.216 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: TERMINATE_EVENT
01-28 11:20:26.226 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588)
01-28 11:20:26.240 DEBUG [TSLocationManagerActivity onDestroy] 
01-28 11:20:27.107 DEBUG [AbstractService a] 
  🎾  LocationRequestService [eventCount: 1]
01-28 11:20:27.109 INFO [LocationRequestService b] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 1
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198429,21.644634 hAcc=5 et=+5h14m37s107ms alt=0.0 vel=11.205119 bear=255.46822 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 797ms, time: 1643365226312

01-28 11:20:27.114 INFO [TSLocationManager onSingleLocationResult] 
  🔵  Acquired motionchange position, isMoving: false
01-28 11:20:27.115 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.032
01-28 11:20:27.120 DEBUG [AbstractService a] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
01-28 11:20:27.123 DEBUG [AbstractService onDestroy] 
  🔴  LocationRequestService destroyed
01-28 11:20:27.257 DEBUG [LocationRequestService b] SingleLocationRequest 1 isFinished? true
01-28 11:20:27.258 DEBUG [AbstractService a] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
01-28 11:20:27.263 INFO [b persist] 
  ✅  INSERT: 0dcd513c-e86d-481c-8f5a-75622ddda2e2
01-28 11:20:27.267 INFO [ActivityRecognitionService b] 
  🎾  Start motion-activity updates
01-28 11:20:27.269 DEBUG [TSGeofenceManager startMonitoringStationaryRegion] 
  🎾  Start monitoring stationary region (radius: 150.0m 49.198429,21.644634 hAcc=5.032)
01-28 11:20:27.312 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:20:27.312 INFO [TrackingService h] 
╔═════════════════════════════════════════════
║ TrackingService motionchange: false
╠═════════════════════════════════════════════

01-28 11:20:27.313 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: false]
01-28 11:20:27.568 DEBUG [AbstractService onDestroy] 
  🔴  TrackingService destroyed
01-28 11:20:32.572 DEBUG [TSConfig d] ℹ️   Persist config, dirty: [isMoving]
01-28 11:20:32.574 INFO [HeartbeatService c] 
  🔴  Stop heartbeat
01-28 11:20:32.575 DEBUG [TSGeofenceManager stopMonitoringStationaryRegion] 
  🔴  Stop monitoring stationary region
01-28 11:20:32.578 INFO [c h] 
  🔵  LocationAuthorization: Requesting permission
01-28 11:20:32.578 INFO [TrackingService a] 
  🔵  setPace: false → true
01-28 11:20:32.579 INFO [c$k onPermissionGranted] 
  ✅  LocationAuthorization: Permission granted
01-28 11:20:32.594 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:20:32.594 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:20:32.594 INFO [TrackingService h] 
╔═════════════════════════════════════════════
║ TrackingService motionchange: true
╠═════════════════════════════════════════════

01-28 11:20:32.998 DEBUG [AbstractService a] 
  🎾  LocationRequestService [eventCount: 1]
01-28 11:20:33.000 INFO [LocationRequestService b] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 2
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198428,21.644624 hAcc=5 et=+5h14m43s435ms alt=0.0 vel=10.540173 bear=256.76184 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 360ms, time: 1643365232640

01-28 11:20:33.003 INFO [TSLocationManager onSingleLocationResult] 
  🔵  Acquired motionchange position, isMoving: true
01-28 11:20:33.004 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.0755
01-28 11:20:33.009 DEBUG [AbstractService a] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
01-28 11:20:33.019 DEBUG [AbstractService onDestroy] 
  🔴  LocationRequestService destroyed
01-28 11:20:33.076 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:20:33.076 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-28 11:20:33.076 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:20:33.079 INFO [b persist] 
  ✅  INSERT: aabe3a7c-fcc7-46e7-97f6-6a97da9e1746
01-28 11:20:33.086 DEBUG [LocationRequestService b] SingleLocationRequest 2 isFinished? true
01-28 11:20:33.087 DEBUG [AbstractService a] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
01-28 11:20:33.090 INFO [ActivityRecognitionService b] 
  🎾  Start motion-activity updates
01-28 11:20:33.094 INFO [TSLocationManager removeLocationUpdates] 
  🔴  Location-services: OFF
01-28 11:20:33.100 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:20:33.101 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-28 11:20:33.118 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:20:33.125 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:20:33.125 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198428,21.644624 hAcc=5 et=+5h14m43s435ms alt=0.0 vel=10.540173 bear=256.76184 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 483ms, time: 1643365232640

01-28 11:20:33.126 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:20:33.128 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 10.0->30.0)
01-28 11:20:33.133 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:20:33.220 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:20:33.222 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198428,21.644624 hAcc=5 et=+5h14m43s435ms alt=0.0 vel=10.540173 bear=256.76184 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 581ms, time: 1643365232640

01-28 11:20:33.222 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:20:33.223 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:20:33.225 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
01-28 11:20:33.239 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:20:33.247 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:20:33.248 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198429,21.644638 hAcc=5 et=+5h14m44s11ms alt=0.0 vel=10.910749 bear=255.94308 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 31ms, time: 1643365233159

01-28 11:20:33.249 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -9.211628
01-28 11:20:33.249 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:20:33.249 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:20:33.250 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.119
01-28 11:20:33.263 INFO [b persist] 
  ✅  INSERT: 25202c87-7f2b-4338-b886-a70642cf3984
01-28 11:20:35.600 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:20:35.603 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.202590,21.651550 hAcc=5 et=+5h14m46s366ms alt=0.0 vel=11.394935 bear=173.0 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 29ms, time: 1643365235569

01-28 11:20:35.604 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:20:35.604 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: 674.6234
01-28 11:20:35.604 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.119
01-28 11:20:35.604 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 684.0275, apparent speed: 290.45755
01-28 11:20:35.605 DEBUG [TSLocationManager incrementOdometer] Odometer: 684.2401
01-28 11:20:35.605 DEBUG [TrackingService b] 
  ℹ️  Force cancel cancel stopTimeout due to apparent movement beyond stoppedAt location
01-28 11:20:35.608 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: STOP_TIMEOUT
01-28 11:20:35.621 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 62355ms (jobID: -18513055)
01-28 11:20:35.622 INFO [b persist] 
  ✅  INSERT: e29a8354-6aa1-471d-a2ff-5f47e35ca4c3
01-28 11:20:35.625 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:20:38.337 INFO [ScheduleEvent onOneShot] 
╔═════════════════════════════════════════════
║ ⏰ OneShot event fired: TERMINATE_EVENT
╠═════════════════════════════════════════════

01-28 11:20:38.343 DEBUG [TerminateEvent <init>] 
  ℹ️  TERMINATE_EVENT ignored (MainActivity is still active).
01-28 11:20:39.437 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:20:39.440 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.202250,21.651611 hAcc=5 et=+5h14m50s210ms alt=0.0 vel=11.355903 bear=172.2692 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 24ms, time: 1643365239413

01-28 11:20:39.444 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:20:39.445 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 38.074757, apparent speed: 9.907561
01-28 11:20:39.446 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.119
01-28 11:20:39.451 DEBUG [TSLocationManager incrementOdometer] Odometer: 722.3149
01-28 11:20:39.467 INFO [b persist] 
  ✅  INSERT: f158425f-6940-47ad-a2ef-c8bcc7b2f337
01-28 11:20:39.487 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
01-28 11:20:39.495 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-28 11:20:39.502 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:20:42.494 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:20:42.495 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.201916,21.651687 hAcc=5 et=+5h14m53s271ms alt=0.0 vel=11.398567 bear=170.97607 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 18ms, time: 1643365242474

01-28 11:20:42.497 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: 27.51764
01-28 11:20:42.497 DEBUG [TrackingService b] 
  ℹ️  Force cancel cancel stopTimeout due to apparent movement beyond stoppedAt location
01-28 11:20:42.497 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:20:42.498 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 37.51764, apparent speed: 12.25666
01-28 11:20:42.498 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.1155
01-28 11:20:42.499 DEBUG [TSLocationManager incrementOdometer] Odometer: 759.8325
01-28 11:20:42.501 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: STOP_TIMEOUT
01-28 11:20:42.518 INFO [b persist] 
  ✅  INSERT: 8f823be0-b527-4020-81e1-14a231bf93f5
01-28 11:20:42.556 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 63061ms (jobID: -18513055)
01-28 11:20:42.559 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:20:45.547 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:20:45.551 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.201640,21.651745 hAcc=5 et=+5h14m56s331ms alt=0.0 vel=11.386749 bear=171.32428 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 14ms, time: 1643365245529

01-28 11:20:45.552 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 31.071772, apparent speed: 10.157493
01-28 11:20:45.552 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:20:45.553 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.112
01-28 11:20:45.559 DEBUG [TSLocationManager incrementOdometer] Odometer: 790.9043
01-28 11:20:45.572 INFO [b persist] 
  ✅  INSERT: 528ef735-34c1-4160-b803-bb3a8bad1298
01-28 11:20:45.595 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
01-28 11:20:45.599 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-28 11:20:45.609 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:20:48.204 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:20:48.210 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 31.145695, apparent speed: 11.905847
01-28 11:20:48.210 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.0559998
01-28 11:20:48.210 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.201362,21.651799 hAcc=5 et=+5h14m58s947ms alt=0.0 vel=11.404916 bear=173.62343 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 54ms, time: 1643365248145

01-28 11:20:48.210 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:20:48.211 DEBUG [TSLocationManager incrementOdometer] Odometer: 822.05
01-28 11:20:48.213 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: 21.145695
01-28 11:20:48.214 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:20:48.260 INFO [b persist] 
  ✅  INSERT: 1d721044-5970-4168-9bad-14d850c524de
01-28 11:20:48.899 INFO [TSScheduleManager oneShot] 
  ⏰ Oneshot TERMINATE_EVENT is already pending
01-28 11:20:51.192 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:20:51.194 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.201031,21.651838 hAcc=5 et=+5h15m1s968ms alt=0.0 vel=11.391619 bear=175.18793 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 20ms, time: 1643365251171

01-28 11:20:51.194 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: 58.02894
01-28 11:20:51.194 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:20:51.195 DEBUG [TrackingService b] 
  ℹ️  Force cancel cancel stopTimeout due to apparent movement beyond stoppedAt location
01-28 11:20:51.196 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 36.903057, apparent speed: 12.219556
01-28 11:20:51.196 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.0
01-28 11:20:51.197 DEBUG [TSLocationManager incrementOdometer] Odometer: 858.95306
01-28 11:20:51.204 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: STOP_TIMEOUT
01-28 11:20:51.223 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 63020ms (jobID: -18513055)
01-28 11:20:51.227 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:20:51.244 INFO [b persist] 
  ✅  INSERT: a073b977-5f16-4885-a650-93c6279b8d49
01-28 11:20:53.863 INFO [TrackingService a] 
  ℹ️  Location availability: false
01-28 11:20:53.863 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:20:53.863 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:39.969 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: TERMINATE_EVENT
01-28 11:21:40.142 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:40.156 INFO [TrackingService a] 
  ℹ️  Location availability: true
01-28 11:21:40.157 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:40.168 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:40.169 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198875,21.646432 hAcc=5 et=+5h15m49s858ms alt=0.0 vel=12.5615 bear=249.33102 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 1105ms, time: 1643365299060

01-28 11:21:40.170 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:40.172 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 30.0->40.0)
01-28 11:21:40.177 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 461.27075, apparent speed: 9.631881
01-28 11:21:40.178 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.0
01-28 11:21:40.179 DEBUG [TSLocationManager incrementOdometer] Odometer: 1320.2239
01-28 11:21:40.189 INFO [b persist] 
  ✅  INSERT: d082a601-540a-424d-b99a-17df1b6cf18e
01-28 11:21:40.228 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
01-28 11:21:40.240 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-28 11:21:40.244 INFO [TSLocationManager removeLocationUpdates] 
  🔴  Location-services: OFF
01-28 11:21:40.245 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:21:40.245 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-28 11:21:40.252 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:40.307 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:40.308 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198843,21.646310 hAcc=5 et=+5h15m50s939ms alt=0.0 vel=12.488047 bear=249.67033 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 163ms, time: 1643365300078

01-28 11:21:40.309 DEBUG [TrackingService b] Received stoppedAt location
01-28 11:21:40.309 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:40.334 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 10.0->30.0)
01-28 11:21:40.335 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.0
01-28 11:21:40.345 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:40.356 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 9.533958, apparent speed: 8.82774
01-28 11:21:40.356 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.0
01-28 11:21:40.356 DEBUG [TSLocationManager incrementOdometer] Odometer: 1329.7578
01-28 11:21:40.376 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:40.376 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198843,21.646310 hAcc=5 et=+5h15m50s939ms alt=0.0 vel=12.488047 bear=249.67033 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 231ms, time: 1643365300078

01-28 11:21:40.377 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.0
01-28 11:21:40.377 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:40.398 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:40.400 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:21:40.423 INFO [b persist] 
  ✅  INSERT: 4eae2f8c-6620-41f8-acbc-0724b38bdf4f
01-28 11:21:40.519 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:40.520 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.0
01-28 11:21:40.520 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198843,21.646310 hAcc=5 et=+5h15m50s939ms alt=0.0 vel=12.488047 bear=249.67033 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 375ms, time: 1643365300078

01-28 11:21:40.520 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:40.521 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:40.521 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:21:42.507 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:42.508 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198740,21.645901 hAcc=5 et=+5h15m53s273ms alt=0.0 vel=12.791877 bear=251.54625 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 30ms, time: 1643365302427

01-28 11:21:42.509 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: 21.858156
01-28 11:21:42.509 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:42.510 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:42.511 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 30.0->40.0)
01-28 11:21:42.519 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 31.920156, apparent speed: 13.682022
01-28 11:21:42.521 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.0
01-28 11:21:42.522 DEBUG [TSLocationManager incrementOdometer] Odometer: 1361.678
01-28 11:21:42.559 INFO [b persist] 
  ✅  INSERT: b414a2ba-39a7-42d1-a8b5-4032392ef3c0
01-28 11:21:42.626 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:42.627 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198739,21.645892 hAcc=5 et=+5h15m53s321ms alt=0.0 vel=12.728394 bear=250.8199 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 100ms, time: 1643365302437

01-28 11:21:42.628 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:42.628 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: 22.52296
01-28 11:21:42.628 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.0
01-28 11:21:42.628 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:42.640 INFO [b persist] 
  ✅  INSERT: 834610c9-e3a0-4f76-9bff-a8bea91bb92a
01-28 11:21:46.496 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:46.498 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198603,21.645355 hAcc=5 et=+5h15m57s276ms alt=0.0 vel=12.381339 bear=249.41583 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 16ms, time: 1643365306479

01-28 11:21:46.502 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:46.502 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 40.0->30.0)
01-28 11:21:46.502 DEBUG [TrackingService b] 
  ℹ️  Force cancel cancel stopTimeout due to apparent movement beyond stoppedAt location
01-28 11:21:46.502 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: 64.52342
01-28 11:21:46.504 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 41.970547, apparent speed: 10.614706
01-28 11:21:46.505 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: STOP_TIMEOUT
01-28 11:21:46.505 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.0
01-28 11:21:46.506 DEBUG [TSLocationManager incrementOdometer] Odometer: 1404.3082
01-28 11:21:46.513 INFO [b persist] 
  ✅  INSERT: 15f22c25-f54f-4c58-b0e4-a9f8caabb25b
01-28 11:21:46.546 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 63954ms (jobID: -18513055)
01-28 11:21:46.550 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:46.570 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:46.571 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198591,21.645318 hAcc=5 et=+5h15m57s304ms alt=0.0 vel=12.589642 bear=248.16843 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 61ms, time: 1643365306505

01-28 11:21:46.572 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 30.0->40.0)
01-28 11:21:46.572 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:46.574 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
01-28 11:21:46.574 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.0
01-28 11:21:46.579 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-28 11:21:46.581 INFO [b persist] 
  ✅  INSERT: 123552c2-7c6b-4f0d-9157-5a94383806d3
01-28 11:21:46.600 INFO [TSLocationManager removeLocationUpdates] 
  🔴  Location-services: OFF
01-28 11:21:46.601 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-28 11:21:46.601 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:21:46.602 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:46.676 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:46.677 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.05
01-28 11:21:46.677 DEBUG [TrackingService b] Received stoppedAt location
01-28 11:21:46.677 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198591,21.645318 hAcc=5 et=+5h15m57s304ms alt=0.0 vel=12.589642 bear=248.16843 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 167ms, time: 1643365306505

01-28 11:21:46.678 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:46.679 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 10.0->40.0)
01-28 11:21:46.679 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:46.681 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:21:46.774 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:46.775 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:46.775 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.05
01-28 11:21:46.775 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198591,21.645318 hAcc=5 et=+5h15m57s304ms alt=0.0 vel=12.589642 bear=248.16843 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 265ms, time: 1643365306505

01-28 11:21:46.775 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:46.775 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:21:46.828 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:46.829 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198591,21.645318 hAcc=5 et=+5h15m57s304ms alt=0.0 vel=12.589642 bear=248.16843 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 319ms, time: 1643365306505

01-28 11:21:46.831 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:46.831 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:46.831 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.05
01-28 11:21:46.831 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:21:50.556 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:50.557 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198442,21.644743 hAcc=5 et=+5h16m1s332ms alt=0.0 vel=12.25015 bear=249.1048 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 20ms, time: 1643365310532

01-28 11:21:50.558 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: 34.906746
01-28 11:21:50.558 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:50.558 DEBUG [TrackingService b] 
  ℹ️  Force cancel cancel stopTimeout due to apparent movement beyond stoppedAt location
01-28 11:21:50.559 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 40.0->30.0)
01-28 11:21:50.561 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 45.090748, apparent speed: 11.197107
01-28 11:21:50.561 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.0
01-28 11:21:50.561 DEBUG [TSLocationManager incrementOdometer] Odometer: 1452.3844
01-28 11:21:50.564 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: STOP_TIMEOUT
01-28 11:21:50.579 INFO [b persist] 
  ✅  INSERT: 6e3bfc1b-de6e-4283-aac8-df3d3b993848
01-28 11:21:50.582 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 64027ms (jobID: -18513055)
01-28 11:21:50.586 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:50.640 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:50.641 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198423,21.644678 hAcc=5 et=+5h16m1s353ms alt=0.0 vel=12.578948 bear=248.1101 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 82ms, time: 1643365310545

01-28 11:21:50.642 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:50.642 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 30.0->40.0)
01-28 11:21:50.643 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 5.1381507, apparent speed: 244.67384
01-28 11:21:50.644 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.062
01-28 11:21:50.644 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
01-28 11:21:50.649 INFO [b persist] 
  ✅  INSERT: 97705b1b-3de9-4e4a-ae84-e72d4ff04c52
01-28 11:21:50.658 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-28 11:21:50.668 INFO [TSLocationManager removeLocationUpdates] 
  🔴  Location-services: OFF
01-28 11:21:50.669 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:21:50.670 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-28 11:21:50.671 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:50.701 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:50.702 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198423,21.644678 hAcc=5 et=+5h16m1s353ms alt=0.0 vel=12.578948 bear=248.1101 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 143ms, time: 1643365310545

01-28 11:21:50.703 DEBUG [TrackingService b] Received stoppedAt location
01-28 11:21:50.703 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:50.703 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 10.0->40.0)
01-28 11:21:50.703 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.254
01-28 11:21:50.704 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:21:50.706 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:50.782 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:50.783 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198423,21.644678 hAcc=5 et=+5h16m1s353ms alt=0.0 vel=12.578948 bear=248.1101 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 224ms, time: 1643365310545

01-28 11:21:50.784 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.254
01-28 11:21:50.784 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:50.784 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:50.787 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:21:50.956 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:50.957 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198423,21.644678 hAcc=5 et=+5h16m1s353ms alt=0.0 vel=12.578948 bear=248.1101 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 398ms, time: 1643365310545

01-28 11:21:50.958 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:50.958 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.254
01-28 11:21:50.959 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:50.961 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:21:54.934 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:54.935 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: 49.05943
01-28 11:21:54.935 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198241,21.643913 hAcc=5 et=+5h16m5s712ms alt=0.0 vel=12.830606 bear=249.29402 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 17ms, time: 1643365314915

01-28 11:21:54.936 DEBUG [TrackingService b] 
  ℹ️  Force cancel cancel stopTimeout due to apparent movement beyond stoppedAt location
01-28 11:21:54.938 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:54.942 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 59.396427, apparent speed: 13.626159
01-28 11:21:54.944 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.057
01-28 11:21:54.945 DEBUG [TSLocationManager incrementOdometer] Odometer: 1516.9076
01-28 11:21:54.945 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: STOP_TIMEOUT
01-28 11:21:54.955 INFO [b persist] 
  ✅  INSERT: d373671d-81fc-4d12-ab34-e4187e9a7c56
01-28 11:21:54.965 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 64359ms (jobID: -18513055)
01-28 11:21:54.967 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:58.654 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:58.663 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198090,21.643292 hAcc=5 et=+5h16m9s428ms alt=0.0 vel=12.490586 bear=250.68037 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 27ms, time: 1643365318626

01-28 11:21:58.665 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:58.666 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 40.0->30.0)
01-28 11:21:58.669 DEBUG [TSLocationManager incrementOdometer] Odometer: 1565.1438
01-28 11:21:58.669 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 48.236217, apparent speed: 12.984177
01-28 11:21:58.669 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.027
01-28 11:21:58.680 INFO [b persist] 
  ✅  INSERT: fb583c52-6e0c-49bd-b830-baae583992a2
01-28 11:21:58.737 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
01-28 11:21:58.741 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-28 11:21:58.744 INFO [TSLocationManager removeLocationUpdates] 
  🔴  Location-services: OFF
01-28 11:21:58.745 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:21:58.745 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-28 11:21:58.746 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:58.785 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:58.786 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198090,21.643292 hAcc=5 et=+5h16m9s428ms alt=0.0 vel=12.490586 bear=250.68037 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 152ms, time: 1643365318626

01-28 11:21:58.786 DEBUG [TrackingService b] Received stoppedAt location
01-28 11:21:58.786 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:58.786 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.0
01-28 11:21:58.787 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:58.787 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 10.0->30.0)
01-28 11:21:58.788 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:21:58.866 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:58.867 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198090,21.643292 hAcc=5 et=+5h16m9s428ms alt=0.0 vel=12.490586 bear=250.68037 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 233ms, time: 1643365318626

01-28 11:21:58.867 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.0
01-28 11:21:58.867 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:58.868 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:58.868 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:21:58.905 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:21:58.907 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.198090,21.643292 hAcc=5 et=+5h16m9s428ms alt=0.0 vel=12.490586 bear=250.68037 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 272ms, time: 1643365318626

01-28 11:21:58.908 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:21:58.908 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.0
01-28 11:21:58.909 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:21:58.909 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:22:01.903 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:01.904 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197979,21.642825 hAcc=5 et=+5h16m12s674ms alt=0.0 vel=12.680523 bear=249.47002 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 24ms, time: 1643365321877

01-28 11:22:01.906 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:01.906 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: 26.141901
01-28 11:22:01.907 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 30.0->40.0)
01-28 11:22:01.909 DEBUG [TrackingService b] 
  ℹ️  Force cancel cancel stopTimeout due to apparent movement beyond stoppedAt location
01-28 11:22:01.911 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 36.1999, apparent speed: 11.155594
01-28 11:22:01.912 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.025
01-28 11:22:01.913 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: STOP_TIMEOUT
01-28 11:22:01.914 DEBUG [TSLocationManager incrementOdometer] Odometer: 1601.3438
01-28 11:22:01.924 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 63245ms (jobID: -18513055)
01-28 11:22:01.925 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:01.983 INFO [b persist] 
  ✅  INSERT: ec9b7737-ed2b-4fd5-9250-ab614eb8a38c
01-28 11:22:02.086 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:02.090 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:02.090 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197979,21.642825 hAcc=5 et=+5h16m12s674ms alt=0.0 vel=12.680523 bear=249.47002 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 207ms, time: 1643365321877

01-28 11:22:02.091 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:22:02.095 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
01-28 11:22:02.104 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-28 11:22:02.111 INFO [TSLocationManager removeLocationUpdates] 
  🔴  Location-services: OFF
01-28 11:22:02.112 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:22:02.112 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-28 11:22:02.114 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:02.174 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:02.175 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197979,21.642825 hAcc=5 et=+5h16m12s674ms alt=0.0 vel=12.680523 bear=249.47002 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 295ms, time: 1643365321877

01-28 11:22:02.175 DEBUG [TrackingService b] Received stoppedAt location
01-28 11:22:02.177 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:02.178 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.116
01-28 11:22:02.178 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 10.0->40.0)
01-28 11:22:02.188 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:02.189 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:22:02.272 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:02.276 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197979,21.642825 hAcc=5 et=+5h16m12s674ms alt=0.0 vel=12.680523 bear=249.47002 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 396ms, time: 1643365321877

01-28 11:22:02.277 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:02.277 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.116
01-28 11:22:02.277 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:22:02.285 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:06.303 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:06.304 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197846,21.642222 hAcc=5 et=+5h16m17s74ms alt=0.0 vel=12.229199 bear=252.27126 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 23ms, time: 1643365326277

01-28 11:22:06.304 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: 36.056484
01-28 11:22:06.305 DEBUG [TrackingService b] 
  ℹ️  Force cancel cancel stopTimeout due to apparent movement beyond stoppedAt location
01-28 11:22:06.321 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:06.322 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 40.0->30.0)
01-28 11:22:06.322 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: STOP_TIMEOUT
01-28 11:22:06.324 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 46.342484, apparent speed: 10.532383
01-28 11:22:06.324 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.159
01-28 11:22:06.326 DEBUG [TSLocationManager incrementOdometer] Odometer: 1647.6863
01-28 11:22:06.336 INFO [b persist] 
  ✅  INSERT: f6cf7d4f-9993-4036-a446-9212c05027d2
01-28 11:22:06.364 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 64400ms (jobID: -18513055)
01-28 11:22:06.366 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:06.385 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:06.386 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197846,21.642222 hAcc=5 et=+5h16m17s74ms alt=0.0 vel=12.229199 bear=252.27126 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 105ms, time: 1643365326277

01-28 11:22:06.387 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:06.387 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:22:06.389 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
01-28 11:22:06.394 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-28 11:22:06.398 INFO [TSLocationManager removeLocationUpdates] 
  🔴  Location-services: OFF
01-28 11:22:06.399 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:22:06.399 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-28 11:22:06.400 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:06.542 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:06.549 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197829,21.642148 hAcc=5 et=+5h16m17s147ms alt=0.0 vel=12.554335 bear=251.22745 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 190ms, time: 1643365326289

01-28 11:22:06.553 DEBUG [TrackingService b] Received stoppedAt location
01-28 11:22:06.555 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:06.555 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 10.0->40.0)
01-28 11:22:06.558 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 5.732458, apparent speed: 79.61747
01-28 11:22:06.559 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.342
01-28 11:22:06.559 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:06.562 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.127
01-28 11:22:06.563 DEBUG [TSLocationManager incrementOdometer] Odometer: 1653.4187
01-28 11:22:06.608 INFO [b persist] 
  ✅  INSERT: 47b4776e-c4dc-41ad-b5e6-ee7ede153ada
01-28 11:22:06.630 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:06.631 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.342
01-28 11:22:06.631 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:06.631 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:06.631 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197829,21.642148 hAcc=5 et=+5h16m17s147ms alt=0.0 vel=12.554335 bear=251.22745 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 278ms, time: 1643365326289

01-28 11:22:06.632 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:22:09.576 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:09.577 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197658,21.641632 hAcc=5 et=+5h16m20s364ms alt=0.0 vel=13.069388 bear=234.74666 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 7ms, time: 1643365329566

01-28 11:22:09.577 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: 31.920002
01-28 11:22:09.578 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.21
01-28 11:22:09.578 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 42.166004, apparent speed: 13.11132
01-28 11:22:09.578 DEBUG [TSLocationManager incrementOdometer] Odometer: 1695.5847
01-28 11:22:09.578 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:09.578 DEBUG [TrackingService b] 
  ℹ️  Force cancel cancel stopTimeout due to apparent movement beyond stoppedAt location
01-28 11:22:09.585 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: STOP_TIMEOUT
01-28 11:22:09.600 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: MOTION_ACTIVITY_CHECK in 63216ms (jobID: -18513055)
01-28 11:22:09.605 INFO [b persist] 
  ✅  INSERT: 640e2a29-531f-412a-827c-582fb489efe4
01-28 11:22:09.607 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:11.854 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:11.855 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197386,21.641216 hAcc=5 et=+5h16m22s633ms alt=0.0 vel=15.564299 bear=220.29855 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 16ms, time: 1643365331837

01-28 11:22:11.856 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:11.858 DEBUG [TSLocationManager locationIsInvalid] Distance from last location: 42.82387, apparent speed: 18.873457
01-28 11:22:11.859 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
01-28 11:22:11.859 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.0
01-28 11:22:11.860 DEBUG [TSLocationManager incrementOdometer] Odometer: 1738.4086
01-28 11:22:11.870 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: MOTION_ACTIVITY_CHECK
01-28 11:22:11.883 INFO [b persist] 
  ✅  INSERT: 15e0971b-2795-425e-b4f5-023eec74815e
01-28 11:22:11.883 INFO [TSLocationManager removeLocationUpdates] 
  🔴  Location-services: OFF
01-28 11:22:11.884 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:22:11.885 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-28 11:22:11.886 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:11.922 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:11.923 DEBUG [TrackingService b] Received stoppedAt location
01-28 11:22:11.923 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:11.923 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 10.0->40.0)
01-28 11:22:11.923 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.018
01-28 11:22:11.923 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197386,21.641216 hAcc=5 et=+5h16m22s633ms alt=0.0 vel=15.564299 bear=220.29855 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 83ms, time: 1643365331837

01-28 11:22:11.923 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:11.933 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:22:11.986 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:11.987 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.018
01-28 11:22:11.987 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197386,21.641216 hAcc=5 et=+5h16m22s633ms alt=0.0 vel=15.564299 bear=220.29855 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 148ms, time: 1643365331837

01-28 11:22:11.988 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:11.988 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:11.988 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:22:14.731 DEBUG [TSConfig d] ℹ️   Persist config, dirty: [isMoving]
01-28 11:22:14.732 INFO [TSLocationManager removeLocationUpdates] 
  🔴  Location-services: OFF
01-28 11:22:14.733 INFO [HeartbeatService c] 
  🔴  Stop heartbeat
01-28 11:22:14.735 INFO [c h] 
  🔵  LocationAuthorization: Requesting permission
01-28 11:22:14.735 INFO [TrackingService a] 
  🔵  setPace: true → false
01-28 11:22:14.736 INFO [c$k onPermissionGranted] 
  ✅  LocationAuthorization: Permission granted
01-28 11:22:15.559 DEBUG [AbstractService a] 
  🎾  LocationRequestService [eventCount: 1]
01-28 11:22:15.560 INFO [LocationRequestService b] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 3
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.197079,21.640941 hAcc=5 et=+5h16m25s582ms alt=0.0 vel=14.704528 bear=209.71187 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 773ms, time: 1643365334787

01-28 11:22:15.562 INFO [TSLocationManager onSingleLocationResult] 
  🔵  Acquired motionchange position, isMoving: false
01-28 11:22:15.562 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.058
01-28 11:22:15.563 DEBUG [TSLocationManager incrementOdometer] Odometer: 1778.0354
01-28 11:22:15.576 DEBUG [LocationRequestService b] SingleLocationRequest 3 isFinished? true
01-28 11:22:15.580 INFO [b persist] 
  ✅  INSERT: cb7a85e0-3e2d-4195-87e1-b67107bd72d2
01-28 11:22:15.580 DEBUG [AbstractService a] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
01-28 11:22:15.629 INFO [ActivityRecognitionService b] 
  🎾  Start motion-activity updates
01-28 11:22:15.631 DEBUG [TSGeofenceManager startMonitoringStationaryRegion] 
  🎾  Start monitoring stationary region (radius: 150.0m 49.1970786,21.6409407 hAcc=5.022)
01-28 11:22:15.639 DEBUG [AbstractService a] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
01-28 11:22:15.664 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:15.665 INFO [TrackingService h] 
╔═════════════════════════════════════════════
║ TrackingService motionchange: false
╠═════════════════════════════════════════════

01-28 11:22:15.667 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: STOP_TIMEOUT
01-28 11:22:15.672 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: false]
01-28 11:22:15.835 DEBUG [AbstractService onDestroy] 
  🔴  LocationRequestService destroyed
01-28 11:22:15.925 DEBUG [AbstractService onDestroy] 
  🔴  TrackingService destroyed
01-28 11:22:58.818 DEBUG [TSConfig d] ℹ️   Persist config, dirty: [isMoving]
01-28 11:22:58.819 INFO [HeartbeatService c] 
  🔴  Stop heartbeat
01-28 11:22:58.822 DEBUG [TSGeofenceManager stopMonitoringStationaryRegion] 
  🔴  Stop monitoring stationary region
01-28 11:22:58.823 INFO [c h] 
  🔵  LocationAuthorization: Requesting permission
01-28 11:22:58.823 INFO [TrackingService a] 
  🔵  setPace: false → true
01-28 11:22:58.825 INFO [c$k onPermissionGranted] 
  ✅  LocationAuthorization: Permission granted
01-28 11:22:58.838 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:58.839 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:58.839 INFO [TrackingService h] 
╔═════════════════════════════════════════════
║ TrackingService motionchange: true
╠═════════════════════════════════════════════

01-28 11:22:59.395 DEBUG [AbstractService a] 
  🎾  LocationRequestService [eventCount: 1]
01-28 11:22:59.397 INFO [LocationRequestService b] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 4
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.191325,21.639619 hAcc=5 et=+5h17m10s173ms alt=0.0 vel=15.230055 bear=175.34715 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 18ms, time: 1643365379376

01-28 11:22:59.400 INFO [TSLocationManager onSingleLocationResult] 
  🔵  Acquired motionchange position, isMoving: true
01-28 11:22:59.400 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.228
01-28 11:22:59.401 DEBUG [TSLocationManager incrementOdometer] Odometer: 2425.1025
01-28 11:22:59.406 DEBUG [AbstractService a] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
01-28 11:22:59.420 DEBUG [AbstractService onDestroy] 
  🔴  LocationRequestService destroyed
01-28 11:22:59.477 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:22:59.478 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:22:59.478 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-28 11:22:59.480 DEBUG [AbstractService a] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
01-28 11:22:59.480 DEBUG [LocationRequestService b] SingleLocationRequest 4 isFinished? true
01-28 11:22:59.483 INFO [ActivityRecognitionService b] 
  🎾  Start motion-activity updates
01-28 11:22:59.495 INFO [b persist] 
  ✅  INSERT: 396a432a-3843-41d4-bfd0-2ad41ee21dd0
01-28 11:22:59.498 INFO [TSLocationManager removeLocationUpdates] 
  🔴  Location-services: OFF
01-28 11:22:59.500 INFO [TSLocationManager requestLocationUpdates] 
  🎾  Location-services: ON
01-28 11:22:59.500 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1
01-28 11:22:59.530 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:59.531 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.191314,21.639621 hAcc=5 et=+5h17m10s280ms alt=0.0 vel=15.231639 bear=175.23218 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 46ms, time: 1643365379466

01-28 11:22:59.531 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:59.532 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:59.534 INFO [TSLocationManager onLocationResult] 
  🔵  Re-scaled distanceFilter: 10.0->40.0)
01-28 11:22:59.540 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.171
01-28 11:22:59.560 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:59.562 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.191314,21.639621 hAcc=5 et=+5h17m10s280ms alt=0.0 vel=15.231639 bear=175.23218 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 75ms, time: 1643365379466

01-28 11:22:59.564 INFO [TSScheduleManager oneShot] 
  ⏰ Scheduled OneShot: STOP_TIMEOUT in 300000ms (jobID: 2059034116)
01-28 11:22:59.575 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:59.581 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:22:59.587 DEBUG [TrackingService b] 
╔═════════════════════════════════════════════
║ TrackingService: LocationResult
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.191314,21.639621 hAcc=5 et=+5h17m10s280ms alt=0.0 vel=15.231639 bear=175.23218 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 97ms, time: 1643365379466

01-28 11:22:59.587 INFO [TrackingService b] 
  ℹ️  Distance from stoppedAtLocation: -10.0
01-28 11:22:59.588 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: true]
01-28 11:22:59.589 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:59.589 INFO [b persist] 
  ✅  INSERT: 67a66fd2-fd20-4b4b-9ec0-a1e754737d19
01-28 11:22:59.590 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:22:59.597 DEBUG [TSLocationManager onLocationResult] 
╔═════════════════════════════════════════════
║ Process LocationResult
╠═════════════════════════════════════════════

01-28 11:22:59.598 DEBUG [TSLocationManager onLocationResult] 
  ℹ️  IGNORED: same as last location
01-28 11:23:00.298 DEBUG [TSConfig d] ℹ️   Persist config, dirty: [isMoving]
01-28 11:23:00.299 INFO [TSLocationManager removeLocationUpdates] 
  🔴  Location-services: OFF
01-28 11:23:00.303 INFO [HeartbeatService c] 
  🔴  Stop heartbeat
01-28 11:23:00.306 INFO [TrackingService a] 
  🔵  setPace: true → false
01-28 11:23:00.306 INFO [c h] 
  🔵  LocationAuthorization: Requesting permission
01-28 11:23:00.307 INFO [c$k onPermissionGranted] 
  ✅  LocationAuthorization: Permission granted
01-28 11:23:00.557 DEBUG [AbstractService a] 
  🎾  LocationRequestService [eventCount: 1]
01-28 11:23:00.558 INFO [LocationRequestService b] 
╔═════════════════════════════════════════════
║ motionchange LocationResult: 5
╠═════════════════════════════════════════════
╟─ 📍  Location[fused 49.191185,21.639636 hAcc=5 et=+5h17m11s261ms alt=0.0 vel=15.230559 bear=175.33455 vAcc=1 sAcc=1 bAcc=30 {Bundle[EMPTY_PARCEL]}], age: 91ms, time: 1643365380464

01-28 11:23:00.573 INFO [TSLocationManager onSingleLocationResult] 
  🔵  Acquired motionchange position, isMoving: false
01-28 11:23:00.573 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 5.075
01-28 11:23:00.574 DEBUG [TSLocationManager incrementOdometer] Odometer: 2440.7754
01-28 11:23:00.578 DEBUG [AbstractService a] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
01-28 11:23:00.595 INFO [b persist] 
  ✅  INSERT: 7a7a30db-40f4-4756-b5f9-ce9f4dea44dc
01-28 11:23:00.595 DEBUG [LocationRequestService b] SingleLocationRequest 5 isFinished? true
01-28 11:23:00.596 DEBUG [AbstractService onDestroy] 
  🔴  LocationRequestService destroyed
01-28 11:23:00.597 DEBUG [AbstractService a] ⚙️︎  finish LocationRequestService [eventCount: 0, sticky: false]
01-28 11:23:00.604 INFO [ActivityRecognitionService b] 
  🎾  Start motion-activity updates
01-28 11:23:00.607 DEBUG [TSGeofenceManager startMonitoringStationaryRegion] 
  🎾  Start monitoring stationary region (radius: 150.0m 49.1911847,21.6396357 hAcc=5.026)
01-28 11:23:00.636 DEBUG [AbstractService a] 
  🎾  TrackingService [eventCount: 1]
01-28 11:23:00.645 INFO [TrackingService h] 
╔═════════════════════════════════════════════
║ TrackingService motionchange: false
╠═════════════════════════════════════════════

01-28 11:23:00.650 INFO [TSScheduleManager cancelOneShot] 
  ⏰ Cancel OneShot: STOP_TIMEOUT
01-28 11:23:00.664 DEBUG [AbstractService a] ⚙️︎  finish TrackingService [eventCount: 0, sticky: false]
01-28 11:23:00.916 DEBUG [AbstractService onDestroy] 
  🔴  TrackingService destroyed
01-28 11:23:25.896 DEBUG [AbstractService a] 
  🎾  ActivityRecognitionService [eventCount: 1]
01-28 11:23:25.900 DEBUG [ActivityRecognitionService a] 
  🚘 ️DetectedActivity [type=STILL, confidence=100]
01-28 11:23:25.905 DEBUG [AbstractService a] ⚙️︎  finish ActivityRecognitionService [eventCount: 0, sticky: false]
01-28 11:23:26.910 DEBUG [AbstractService onDestroy] 
  🔴  ActivityRecognitionService destroyed
01-28 11:32:56.638 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: location
01-28 11:32:56.638 DEBUG [StreamHandler onListen] location
01-28 11:32:56.640 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: motionchange
01-28 11:32:56.641 DEBUG [StreamHandler onListen] motionchange
01-28 11:32:56.646 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: activitychange
01-28 11:32:56.650 DEBUG [StreamHandler onListen] activitychange
01-28 11:32:56.657 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: providerchange
01-28 11:32:56.658 DEBUG [StreamHandler onListen] providerchange
01-28 11:32:56.665 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: connectivitychange
01-28 11:32:56.666 DEBUG [StreamHandler onListen] connectivitychange
01-28 11:32:56.670 DEBUG [BackgroundGeolocation removeListener] 
  ✅  removeListener event: http
01-28 11:32:56.672 DEBUG [StreamHandler onListen] http
01-28 11:32:56.673 DEBUG [StreamHandler onListen] authorization
01-28 11:32:56.693 WARN [BackgroundGeolocationModule ready] 
  ⚠️  #ready already called.  Redirecting to #setConfig
01-28 11:32:56.792 WARN [BackgroundGeolocationModule ready] 
  ⚠️  #ready already called.  Redirecting to #setConfig
01-28 11:32:56.829 WARN [BackgroundGeolocationModule ready] 
  ⚠️  #ready already called.  Redirecting to #setConfig
01-28 11:32:56.865 WARN [BackgroundGeolocationModule ready] 
  ⚠️  #ready already called.  Redirecting to #setConfig
01-28 11:32:56.896 WARN [BackgroundGeolocationModule ready] 
  ⚠️  #ready already called.  Redirecting to #setConfig

bujdy avatar Jan 28 '22 10:01 bujdy

When you see this:

✅ INSERT: xxx-yyy-zzz

a record has been inserted into the plug-in’s SQLite db, available from .locations

christocracy avatar Jan 28 '22 13:01 christocracy

Yes they are showing in .location ( its in my function _onGetLocations). Everythink is working fine until i minimize or terminate app.

bujdy avatar Jan 28 '22 13:01 bujdy

Are you granting “Always” authorization?

are you testing with simulated location or with real movement (Eg: 1km walk)?

christocracy avatar Jan 28 '22 13:01 christocracy

My friend was testing it with real movement while he was driving, and i am testing it also with simulated location. And yes authorization is "always"

bujdy avatar Jan 28 '22 13:01 bujdy

My friend was testing it with real movement while he was driving,

What device manufacturer/model/OS version is your friend using?

and i am testing it also with simulated location

The plugin triggers location tracking when the device motion API (accelerometer+gyroscope+magnetometer) says the device is moving. Simulated locations do not cause the plugin to trigger location tracking. Executing .changePace(true) is a manual override to put the plugin into the "moving" state.

After terminate, you would have to vigorously shake your device (typically for 10-30s) to make the plugin think you're walking.

Or go outside for a walk.

christocracy avatar Jan 28 '22 13:01 christocracy

Read the wiki in this repo "Philosophy of Operation". Also read "Debugging".

christocracy avatar Jan 28 '22 13:01 christocracy

I read it but i dont understand what you mean by triggering location tracking. As i said plugin is working when app is opened.. I have no problems with that.

On my emulator i am testing it with this

image

My friend (Samsung Galaxy S20 FE Android version 11) was doing long walks and tested 3 different states. Few minutes when he had opened app, few minutes with minimized and few minutes with terminated app. After this walk he checked jsons (fetched locations from sqlite). Only at the time he was walking with opened app only that jsons were showing.

So i am assuming i may have removed something from code that app is not doing anything while minimized/terminated?

bujdy avatar Jan 28 '22 14:01 bujdy

On my emulator i am testing it with this

you will never experience the true life-cycle of the plugin in the emulator. I do not even use the emulator at all. I only test on my 12 Android devices.

Install on a real device and go outside for a 1km walk.

My friend (Samsung Galaxy S20 FE

This is one of my 12 test devices. Tell your friend to visit https://dontkillmyapp.com and modify their device settings accordingly.

christocracy avatar Jan 28 '22 14:01 christocracy

So i managed to somehow fixed this problem. But there is another problem.

Everything is working fine, my friend is testing app few days (with terminated app, minimized all states) and everything is working. But randomly it stops working. He wont get any update on terminated and minimized state.

For example yesterday app was working, and today it isnt gathering data. Maybe there is some limit? Or maybe after long time plugin wont save data in background? When he reinstall app everything is working normally and again after few days/hours it just wont gather data from background...

Here is my new code

import 'dart:io';

import 'package:enviroapp/helpers/app_colors.dart';
import 'package:enviroapp/helpers/app_styles.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:background_fetch/background_fetch.dart';

import 'package:flutter_background_geolocation/flutter_background_geolocation.dart'
    as bg;
import 'package:path_provider/path_provider.dart';

////
// For pretty-printing locations as JSON
// @see _onLocation
//
import 'dart:convert';

import 'package:shared_preferences/shared_preferences.dart';

JsonEncoder encoder = new JsonEncoder.withIndent("     ");

class TrackingDetailsView extends StatelessWidget {
  static const String NAME = 'hello_world';

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return HelloWorldPage();
  }
}

class HelloWorldPage extends StatefulWidget {
  @override
  _HelloWorldPageState createState() => new _HelloWorldPageState();
}

class _HelloWorldPageState extends State<HelloWorldPage> {
  //late bool _isMoving;
  late bool _enabled;
  late String _motionActivity;
  late String _odometer;
  late int _content;

  @override
  void initState() {
    super.initState();
    _content = 0;
    //_isMoving = false;
    _enabled = false;
    _motionActivity = 'UNKNOWN';
    _odometer = '0';
    _initPlatformState();
    _configureBackgroundFetch();
  }

  Future<Null> _initPlatformState() async {
    // Fetch a Transistor demo server Authorization token for tracker.transistorsoft.com.

    // 1.  Listen to events (See docs for all 12 available events).
    bg.BackgroundGeolocation.onLocation(_onLocation, _onLocationError);
    bg.BackgroundGeolocation.onMotionChange(_onMotionChange);
    bg.BackgroundGeolocation.onActivityChange(_onActivityChange);
    bg.BackgroundGeolocation.onProviderChange(_onProviderChange);
    bg.BackgroundGeolocation.onConnectivityChange(_onConnectivityChange);
    bg.BackgroundGeolocation.onHttp(_onHttp);
    bg.BackgroundGeolocation.onAuthorization(_onAuthorization);

    // 2.  Configure the plugin
    bg.BackgroundGeolocation.ready(bg.Config(
      reset: true,
      debug: false,
      autoSync: false,
      batchSync: true,
      logLevel: bg.Config.LOG_LEVEL_VERBOSE,
      desiredAccuracy: bg.Config.DESIRED_ACCURACY_HIGH,
      distanceFilter: 10.0,
      backgroundPermissionRationale: bg.PermissionRationale(
          title:
              "Allow {applicationName} to access this device's location even when the app is closed or not in use.",
          message:
              "This app collects location data to enable recording your trips to work and calculate distance-travelled.",
          positiveAction: 'Change to "{backgroundPermissionOptionLabel}"',
          negativeAction: 'Cancel'),
      authorization: bg.Authorization(
          // <-- demo server authenticates with JWT
          strategy: bg.Authorization.STRATEGY_JWT,
          refreshPayload: {'refresh_token': '{refreshToken}'}),
      stopOnTerminate: false,
      startOnBoot: true,
      enableHeadless: true,
    )).then((bg.State state) {
      print("[ready] ${state.toMap()}");
      setState(() {
        _enabled = state.enabled;
        //_isMoving = state.isMoving!;
      });
    }).catchError((error) {
      print('[ready] ERROR: $error');
    });
  }

  void _onClickEnable(enabled) {
    if (enabled) {
      bg.BackgroundGeolocation.start().then((bg.State state) {
        setState(() {
          _enabled = state.enabled;
          bg.BackgroundGeolocation.changePace(_enabled);
          //_isMoving = state.isMoving!;
        });
      });
    } else {
      bg.BackgroundGeolocation.stop().then((bg.State state) {
        setState(() {
          _enabled = state.enabled;
          //_isMoving = state.isMoving!;
        });
      });
    }
  }

  // Manually toggle the tracking state:  moving vs stationary
  /*void _onClickChangePace() {
    setState(() {
      _isMoving = !_isMoving;
    });
    print("[onClickChangePace] -> $_isMoving");

    bg.BackgroundGeolocation.changePace(_isMoving).then((bool isMoving) {
      print('[changePace] success $isMoving');
    }).catchError((e) {
      print('[changePace] ERROR: ' + e.code.toString());
    });
  }*/

  Future<void> _onGetLocations() async {
    String log = await getLocationsAsJSON();
    showDialog<void>(
      context: context,
      builder: (BuildContext context) {
        return AlertDialog(
          content: SingleChildScrollView(child: SelectableText(log)),
        );
      },
    );
  }

  Future<String> getLocationsAsJSON() async {
    return json.encode(await bg.BackgroundGeolocation.locations);
  }

  Future<void> _onDestroyLocations() async {
    String logx = await bg.Logger.getLog();
    log(logx);
    await bg.BackgroundGeolocation.setOdometer(0);
    await bg.BackgroundGeolocation.destroyLocations();
  }

  Future<void> _saveLocations(String fileName, String content) async {
    final directory = await getExternalStorageDirectory();
    final path = directory?.path;
    print(path);
    final file = File('$path/$fileName.txt');
    file.writeAsString(content);
  }

  // Manually fetch the current position.
  void _onClickGetCurrentPosition() {
    bg.BackgroundGeolocation.getCurrentPosition(
            persist: true, // <-- do persist this location
            desiredAccuracy: 0, // <-- desire best possible accuracy
            timeout: 30, // <-- wait 30s before giving up.
            samples: 3 // <-- sample 3 location before selecting best.
            )
        .then((bg.Location location) {
      print('[getCurrentPosition] - $location');
    }).catchError((error) {
      print('[getCurrentPosition] ERROR: $error');
    });
  }

  // Go back to HomeApp.

  ////
  // Event handlers
  //

  Future<void> _onLocation(bg.Location location) async {
    String odometerKM = (location.odometer / 1000.0).toStringAsFixed(1);
    var length = (await bg.BackgroundGeolocation.locations).length;
    setState(() {
      _content = length;
      _odometer = odometerKM;
    });
  }

  void _onLocationError(bg.LocationError error) {
    print('[location] ERROR - $error');
  }

  void _onMotionChange(bg.Location location) {
    print('[motionchange] - $location');
  }

  void _onActivityChange(bg.ActivityChangeEvent event) {
    print('[activitychange] - $event');
    setState(() {
      _motionActivity = event.activity;
    });
  }

  void _onHttp(bg.HttpEvent event) async {
    print('[${bg.Event.HTTP}] - $event');
  }

  void _onAuthorization(bg.AuthorizationEvent event) async {
    print('[${bg.Event.AUTHORIZATION}] = $event');
  }

  Future<void> _onProviderChange(bg.ProviderChangeEvent event) async {
    print('$event');
    var length = (await bg.BackgroundGeolocation.locations).length;
    setState(() {
      _content = length;
    });
  }

  void _onConnectivityChange(bg.ConnectivityChangeEvent event) {
    print('$event');
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('BG Geo'),
        backgroundColor: AppColors.black,
        actions: <Widget>[
          Switch(
              value: _enabled,
              activeColor: AppColors.white,
              onChanged: _onClickEnable)
        ],
      ),
      body: Column(
        mainAxisSize: MainAxisSize.max,
        children: [
          Container(
              margin: EdgeInsets.only(top: 50),
              child: Text('$_content', style: AppStyles.body1PoppinsSemiBold)),
          Expanded(
            child: Container(
                alignment: Alignment.bottomCenter,
                padding: const EdgeInsets.only(left: 5.0, right: 5.0),
                child: Row(
                    mainAxisSize: MainAxisSize.max,
                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
                    children: <Widget>[
                      /*IconButton(
                        icon: Icon(Icons.gps_fixed),
                        onPressed: _onClickGetCurrentPosition,
                      ),*/
                      //Text('$_motionActivity · $_odometer km'),
                      MaterialButton(
                        minWidth: 50.0,
                        child: Text("Show JSON"),
                        onPressed: _onGetLocations,
                        color: Colors.blue,
                      ),
                      MaterialButton(
                        minWidth: 50.0,
                        child: Text("Save JSON"),
                        onPressed: () async {
                          var content = await getLocationsAsJSON();
                          await showDialog(
                              context: context,
                              builder: (context) {
                                return AlertDialog(
                                  contentPadding: EdgeInsets.zero,
                                  backgroundColor: Colors.transparent,
                                  content: Column(
                                    mainAxisSize: MainAxisSize.min,
                                    children: [
                                      TextFormField(
                                        onFieldSubmitted: (value) {
                                          _saveLocations(value, content);
                                          _onDestroyLocations();
                                          Navigator.pop(context);
                                        },
                                      )
                                    ],
                                  ),
                                );
                              });
                        },
                        color: Colors.green,
                      ),
                      MaterialButton(
                        minWidth: 50.0,
                        child: Text("Clear database"),
                        onPressed: _onDestroyLocations,
                        color: Colors.red,
                      ),
                      /*MaterialButton(
                          minWidth: 50.0,
                          child: Icon(
                              (_isMoving) ? Icons.pause : Icons.play_arrow,
                              color: Colors.white),
                          color: (_isMoving) ? Colors.red : Colors.green,
                          onPressed: _onClickChangePace)*/
                    ])),
          )
        ],
      ),
    );
  }

  void _configureBackgroundFetch() async {
    BackgroundFetch.configure(
        BackgroundFetchConfig(
            minimumFetchInterval: 15,
            startOnBoot: true,
            stopOnTerminate: false,
            enableHeadless: true,
            requiresStorageNotLow: false,
            requiresBatteryNotLow: false,
            requiresCharging: false,
            requiresDeviceIdle: false,
            requiredNetworkType: NetworkType.NONE), (String taskId) async {
      print("[BackgroundFetch] received event $taskId");

      SharedPreferences prefs = await SharedPreferences.getInstance();
      int count = 0;
      if (prefs.get("fetch-count") != null) {
        count = prefs.getInt("fetch-count") ?? 0;
      }
      prefs.setInt("fetch-count", ++count);
      print('[BackgroundFetch] count: $count');

      if (taskId == 'flutter_background_fetch') {
        // Test scheduling a custom-task in fetch event.
        BackgroundFetch.scheduleTask(TaskConfig(
            taskId: "com.transistorsoft.customtask",
            delay: 5000,
            periodic: false,
            forceAlarmManager: true,
            stopOnTerminate: false,
            enableHeadless: true));
      }
      BackgroundFetch.finish(taskId);
    });
  }
}

bujdy avatar Feb 07 '22 16:02 bujdy

The first thing to do when something unusual occurs is the fetch the plugin's log database.

See Wiki Debugging and learn to use the method emailLog. This will send the plugin's entire log database in an email attachment which you can append here.

christocracy avatar Feb 07 '22 16:02 christocracy

Maybe there is some limit?

No

Or maybe after long time plugin wont save data in background?

I leave some of my 13 test devices sitting idle for weeks at a time. I can confidently take any of them with me for a field-test and they will track.

If you haven't already yet, be sure to modify Android device settings according to https://dontkillmyapp.com.

christocracy avatar Feb 07 '22 16:02 christocracy

background-geolocation.log_2.gz

So here are logs from my friend.

He was travelling for half hour (app was running and mobile was in sleep mode) and he got only 76 locations back. Sometimes locations were not inserted for 1 minute.

He was walking for first 3/4 minutes. Then, (until the end) he entered bus.

bujdy avatar Feb 09 '22 16:02 bujdy

Did you notice something weird in logs? @christocracy

bujdy avatar Feb 20 '22 16:02 bujdy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.

stale[bot] avatar Apr 28 '22 01:04 stale[bot]