transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.63k stars 426 forks source link

What i miss the integrate the plugin? My app, even though it works in the background(killed), even though local notifications come (debug:true) onLocation function like, its not triggered. [iOS] [Own HTTP request] [startBackgroundTask] #1594

Closed ibrahimakar closed 1 year ago

ibrahimakar commented 1 year ago

Your Environment


## Expected Behavior
<!--- Tell us what should happen -->
the function which is named sendAgentLocation calls from onLocation listener when app killed and restart os when for for a salk about 200m.

## Actual Behavior
<!--- Tell us what happens instead -->
when runs in simulator in location freeway drive, everything is ok, but in real device, with debug:true, i received notification which contains moving statement but no request send in bacground task and there is no record in db. 

## Steps to Reproduce
<!--- reproduce this issue; include code to reproduce, if relevant -->
1- Turned on the application
2- Geolocation wakes up the app is working for a walk about 200m
3- Seems onLocation listener not triggerred

## Context
<!--- What were you trying to do? -->
If app is terminated, event onLocation seems not working.

## Debug logs
<!-- include iOS / Android logs
- ios XCode logs,
- use #getLog #emailLog methods (@see docs)
- Android: $ adb logcat -s TSLocationManager
-->
<details><summary>Logs</summary>

``` <!-- Syntax highlighting:  DO NOT REMOVE -->
2022-11-23 15:28:09.714 ℹ️-[TSDBLogger db_save] Log committed

2022-11-23 15:28:09.827 ℹ️-[TSLog destroy] SUCCESS

2022-11-23 15:28:19.900 🔵-[TSLocationManager onSuspend:] enabled? 1)

2022-11-23 15:28:20.160 ℹ️-[TSDBLogger db_delete] maxAge: 259200

2022-11-23 15:28:20.161 ℹ️-[TSLocationManager init] 
╔═════════════════════════════════════════════
║ TSLocationManager (build 387)
╠══════════════════════════════════════════════
{
    activityRecognitionInterval = 10000;
    activityType = 1;
    authorization =     {
    };
    autoSync = 1;
    autoSyncThreshold = 0;
    batchSync = 0;
    debug = 1;
    desiredAccuracy = "-1";
    desiredOdometerAccuracy = 100;
    didDeviceReboot = 0;
    didLaunchInBackground = 0;
    didRequestUpgradeLocationAuthorization = 1;
    disableAutoSyncOnCellular = 0;
    disableElasticity = 0;
    disableLocationAuthorizationAlert = 0;
    disableMotionActivityUpdates = 0;
    disableStopDetection = 0;
    distanceFilter = 10;
    elasticityMultiplier = 1;
    enableTimestampMeta = 0;
    enabled = 1;
    extras =     {
    };
    geofenceInitialTriggerEntry = 1;
    geofenceProximityRadius = 2000;
    geofenceTemplate = "";
    headers =     {
    };
    heartbeatInterval = 60;
    httpRootProperty = location;
    httpTimeout = 60000;
    iOSHasWarnedLocationServicesOff = 0;
    isFirstBoot = 0;
    isMoving = 0;
    lastLocationAuthorizationStatus = 3;
    locationAuthorizationAlert =     {
        cancelButton = Cancel;
        instructions = "To use background location, you must enable '{locationAuthorizationRequest}' in the Location Services settings";
        settingsButton = Settings;
        titleWhenNotEnabled = "Background location is not enabled";
        titleWhenOff = "Location services are off";
    };
    locationAuthorizationRequest = Always;
    locationTemplate = "";
    locationTimeout = 60;
    locationsOrderDirection = ASC;
    logLevel = 5;
    logMaxDays = 3;
    maxBatchSize = "-1";
    maxDaysToPersist = 1;
    maxRecordsToPersist = "-1";
    method = POST;
    minimumActivityRecognitionConfidence = 70;
    odometer = "15807.36376199519";
    params =     {
    };
    pausesLocationUpdatesAutomatically = 1;
    persistMode = 2;
    preventSuspend = 0;
    schedule =     (
    );
    schedulerEnabled = 0;
    showsBackgroundLocationIndicator = 0;
    startOnBoot = 1;
    stationaryRadius = 25;
    stopAfterElapsedMinutes = "-1";
    stopDetectionDelay = 0;
    stopOnStationary = 0;
    stopOnTerminate = 0;
    stopTimeout = 5;
    trackingMode = 1;
    url = "";
    useSignificantChangesOnly = 0;
}

2022-11-23 15:28:20.163 ℹ️-[GeofenceDAO init] 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 DOUBLE NOT NULL DEFAULT 0, extras TEXT)

2022-11-23 15:28:20.163 ℹ️-[GeofenceDAO init] CREATE index IF NOT EXISTS identifier ON geofences (identifier);CREATE index IF NOT EXISTS latitude ON geofences (latitude);CREATE index IF NOT EXISTS longitude ON geofences (longitude);CREATE index IF NOT EXISTS sin_latitude ON geofences (sin_latitude);CREATE index IF NOT EXISTS cos_latitude ON geofences (cos_latitude);CREATE index IF NOT EXISTS sin_longitude ON geofences (sin_longitude);CREATE index IF NOT EXISTS cos_longitude ON geofences (cos_longitude);

2022-11-23 15:28:20.190 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3

2022-11-23 15:28:20.193 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2022-11-23 15:28:20.193 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3

2022-11-23 15:28:20.193 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2022-11-23 15:28:20.193 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2022-11-23 15:28:20.203 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2022-11-23 15:38:14.927 ℹ️-[TSDBLogger db_save] Log committed

2022-11-23 15:38:14.927 ℹ️-[TSDBLogger db_delete] maxAge: 604800

2022-11-23 15:38:14.967 🔵-[TSLocationManager locationManager:didExitRegion:] Exit stationary region

2022-11-23 15:38:14.967 🔵-[TSLocationManager setPace:] 1

2022-11-23 15:38:14.968 ℹ️-[TSConfig persist] 

2022-11-23 15:38:14.971 🎾-[SOMotionDetector startShakeDetection:] sample-rate: 0.2 | M7 DISABLED

2022-11-23 15:38:14.980 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2022-11-23 15:38:14.998 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2022-11-23 15:38:15.015 
📍<+41.00020525,+29.08007329> +/- 35.00m (speed -1.00 mps / course -1.00) @ 23.11.2022 15:38:14 GMT+03:00

2022-11-23 15:38:15.016 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: -1.0m | age: 0.2s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:15.016 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+41.00020525,+29.08007329> +/- 35.00m (speed -1.00 mps / course -1.00) @ 23.11.2022 15:38:14 GMT+03:00

2022-11-23 15:38:15.016 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2022-11-23 15:38:15.016 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 35.0

2022-11-23 15:38:15.017 🎾-[TSLocationManager startMonitoringSignificantLocationChanges] 

2022-11-23 15:38:15.018 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2022-11-23 15:38:15.037 ✅-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS

2022-11-23 15:38:15.057 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 36E5B4E6-F5CA-4BB0-888C-4DD7B551B8A4

2022-11-23 15:38:15.062 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:15.062 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:21.370 
📍<+41.00031635,+29.08010976> +/- 25.00m (speed 0.71 mps / course -1.00) @ 23.11.2022 15:38:21 GMT+03:00

2022-11-23 15:38:21.371 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.3s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:21.372 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 30.0

2022-11-23 15:38:21.467 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: BC7A3F74-DCF3-452D-AC14-6F720156E70A

2022-11-23 15:38:21.468 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:21.469 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:25.846 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:25.846 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 31

2022-11-23 15:38:36.850 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:36.850 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 32

2022-11-23 15:38:38.346 
📍<+41.00048424,+29.07987135> +/- 25.00m (speed 1.38 mps / course -1.00) @ 23.11.2022 15:38:38 GMT+03:00

2022-11-23 15:38:38.346 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.3s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:38.347 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:38:38.347 ℹ️-[TSConfig persist] 

2022-11-23 15:38:38.370 🔵-[TSConfig incrementOdometer:] 15842.7

2022-11-23 15:38:38.440 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: FBB944CD-04AC-4DF8-9FC2-8A5A23341C44

2022-11-23 15:38:38.445 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:38.446 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:47.848 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:47.848 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 34

2022-11-23 15:38:47.994 
📍<+41.00056478,+29.07994324> +/- 25.00m (speed 1.29 mps / course 0.97) @ 23.11.2022 15:38:47 GMT+03:00

2022-11-23 15:38:47.994 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.2s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:47.995 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:38:48.021 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: EE12E2BE-FFD0-46DD-B2AE-C1CBF04C31B8

2022-11-23 15:38:48.021 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:48.021 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:58.851 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:38:58.851 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 29

2022-11-23 15:39:00.100 
📍<+41.00056048,+29.08007067> +/- 25.00m (speed 0.76 mps / course 93.17) @ 23.11.2022 15:38:59 GMT+03:00

2022-11-23 15:39:00.100 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.3s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:00.101 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:39:00.193 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 5BCFCBCE-3D9D-414A-8A37-9E1E7AEC8C3A

2022-11-23 15:39:00.194 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:00.195 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:06.990 
📍<+41.00052441,+29.08018190> +/- 25.00m (speed 1.20 mps / course 66.73) @ 23.11.2022 15:39:06 GMT+03:00

2022-11-23 15:39:06.990 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.2s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:06.990 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:39:06.990 ℹ️-[TSConfig persist] 

2022-11-23 15:39:06.992 🔵-[TSConfig incrementOdometer:] 15869.2

2022-11-23 15:39:07.019 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: C92E45B3-F35A-4220-8EEB-C806D51A8C1E

2022-11-23 15:39:07.020 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:07.020 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:09.848 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:09.848 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 37

2022-11-23 15:39:11.169 
📍<+41.00051533,+29.08025036> +/- 6.00m (speed 1.19 mps / course 93.91) @ 23.11.2022 15:39:10 GMT+03:00

2022-11-23 15:39:11.170 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.4s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:11.170 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:39:11.232 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 76660741-1F4D-4AF5-9AC4-AAFB8E70C1B7

2022-11-23 15:39:11.239 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:11.240 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:15.785 ℹ️-[TSDBLogger db_save] Log committed

2022-11-23 15:39:16.986 
📍<+41.00050387,+29.08037033> +/- 25.00m (speed 1.11 mps / course 94.27) @ 23.11.2022 15:39:16 GMT+03:00

2022-11-23 15:39:16.986 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.2s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:16.987 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:39:17.005 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 6091B367-3390-4A35-B8DC-3B0ADC5AFFFF

2022-11-23 15:39:17.005 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:17.005 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:20.847 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:20.847 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 37

2022-11-23 15:39:22.135 
📍<+41.00049403,+29.08044438> +/- 6.00m (speed 1.01 mps / course 98.41) @ 23.11.2022 15:39:21 GMT+03:00

2022-11-23 15:39:22.135 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.3s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:22.135 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:39:22.136 ℹ️-[TSConfig persist] 

2022-11-23 15:39:22.150 🔵-[TSConfig incrementOdometer:] 15891.5

2022-11-23 15:39:22.253 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 0F54A083-DD20-49BA-8A34-5925D02D6A76

2022-11-23 15:39:22.254 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:22.255 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:30.163 
📍<+41.00042670,+29.08054596> +/- 6.00m (speed 1.01 mps / course 109.63) @ 23.11.2022 15:39:29 GMT+03:00

2022-11-23 15:39:30.165 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.4s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:30.166 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:39:30.166 ℹ️-[TSConfig persist] 

2022-11-23 15:39:30.183 🔵-[TSConfig incrementOdometer:] 15902.9

2022-11-23 15:39:30.256 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: AE0BEBCD-4AC1-4FAF-BC3E-9901F03BD288

2022-11-23 15:39:30.256 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:30.257 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:31.848 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:31.848 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 29

2022-11-23 15:39:36.994 
📍<+41.00042826,+29.08067746> +/- 25.00m (speed 0.73 mps / course 91.97) @ 23.11.2022 15:39:36 GMT+03:00

2022-11-23 15:39:36.994 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.2s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:36.995 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:39:37.015 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 89E16946-E5E1-480D-8AEA-A6B99D168568

2022-11-23 15:39:37.015 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:37.015 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:41.127 
📍<+41.00044013,+29.08076986> +/- 6.00m (speed 1.38 mps / course 88.32) @ 23.11.2022 15:39:40 GMT+03:00

2022-11-23 15:39:41.127 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.3s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:41.127 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:39:41.128 ℹ️-[TSConfig persist] 

2022-11-23 15:39:41.147 🔵-[TSConfig incrementOdometer:] 15921.8

2022-11-23 15:39:41.245 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 062CC63D-FA05-4171-8A84-4912365C1D18

2022-11-23 15:39:41.245 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:41.245 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:42.845 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:42.846 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 37

2022-11-23 15:39:49.994 
📍<+41.00041204,+29.08089150> +/- 25.00m (speed 1.29 mps / course 96.83) @ 23.11.2022 15:39:49 GMT+03:00

2022-11-23 15:39:49.994 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.2s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:49.994 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:39:50.008 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 93B53D83-2DE7-4976-999F-843DACE915A2

2022-11-23 15:39:50.008 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:50.008 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:53.578 🔵-[TSLocationManager onResume:] enabled? 1

2022-11-23 15:39:53.843 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:53.843 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 16

2022-11-23 15:39:57.709 ℹ️-[TSLocationManager log:message:] [RNBackgroundGeolocation startObserving]

2022-11-23 15:39:57.709 ℹ️-[TSLocationManager on:success:failure:] location

2022-11-23 15:39:57.709 ℹ️-[TSLocationManager on:success:failure:] motionchange

2022-11-23 15:39:57.709 ℹ️-[TSLocationManager on:success:failure:] activitychange

2022-11-23 15:39:57.709 ℹ️-[TSLocationManager on:success:failure:] heartbeat

2022-11-23 15:39:57.709 ℹ️-[TSGeofenceManager onGeofence:] 

2022-11-23 15:39:57.709 ℹ️-[TSGeofenceManager onGeofencesChange:] 

2022-11-23 15:39:57.709 ℹ️-[TSLocationManager on:success:failure:] http

2022-11-23 15:39:57.709 ℹ️-[TSLocationManager on:success:failure:] providerchange

2022-11-23 15:39:57.709 ℹ️-[TSLocationManager on:success:failure:] schedule

2022-11-23 15:39:57.709 ℹ️-[TSLocationManager on:success:failure:] powersavechange

2022-11-23 15:39:57.709 ℹ️-[TSHttpService onConnectivityChange:] 

2022-11-23 15:39:57.709 ℹ️-[TSLocationManager on:success:failure:] enabledchange

2022-11-23 15:39:57.709 ℹ️-[TSHttpService onAuthorization:] 

2022-11-23 15:39:57.774 ℹ️-[TSConfig persist] 

2022-11-23 15:39:57.777 ℹ️-[TSConfig persist] 

2022-11-23 15:39:57.782 ℹ️-[TSConfig persist] 

2022-11-23 15:39:57.784 🔵-[TSLocationManager ready] 

2022-11-23 15:39:57.785 ℹ️-[TSLocationManager doStart:] trackingMode: 1

2022-11-23 15:39:57.786 ℹ️-[TSLocationManager loadLastOdometerLocation] <+41.00044013,+29.08076986> +/- -1.00m (speed -1.00 mps / course -1.00) @ 23.11.2022 15:39:57 GMT+03:00

2022-11-23 15:39:57.786 🎾-[TSGeofenceManager start] 

2022-11-23 15:39:57.787 🎾-[SOMotionDetector startDetection] 

2022-11-23 15:39:57.787 🔵-[TSLocationManager setPace:] 0

2022-11-23 15:39:57.787 🔴-[SOMotionDetector stopShakeDetection] OFF

2022-11-23 15:39:57.788 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2022-11-23 15:39:57.795 🔵-[TSLocationManager log:message:] [onProviderChange]

2022-11-23 15:39:57.795 🔵-[TSLocationManager log:message:] [onLocation]

2022-11-23 15:39:57.796 🔵-[TSLocationManager log:message:] [startIOSListener]

2022-11-23 15:39:57.796 🔵-[TSLocationManager log:message:] start bg task desc: [onLocation], timestamp: 1669207189000

2022-11-23 15:39:57.815 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:57.815 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:57.817 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2022-11-23 15:39:57.817 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON

2022-11-23 15:39:57.818 ⚠️-[TSLocationManager start] Already started (ignored)

2022-11-23 15:39:57.823 ℹ️-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke Configured BackgroundFetch

2022-11-23 15:39:57.824 ✅-[BackgroundTaskManager createBackgroundTask] 24

2022-11-23 15:39:57.827 🔵-[TSLocationManager log:message:] success bg task: 24

2022-11-23 15:39:57.848 ✅-[SOMotionDetector startDetection]_block_invoke Enabled M7 MotionActivity updates

2022-11-23 15:39:57.849 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/100 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:57.850 🔵-[TSLocationManager log:message:] [iosActivityChangeSubscription]

2022-11-23 15:39:57.978 
📍<+41.00040917,+29.08092011> +/- 25.00m (speed 0.01 mps / course 96.90) @ 23.11.2022 15:39:57 GMT+03:00

2022-11-23 15:39:57.978 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 0.2s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:57.978 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+41.00040917,+29.08092011> +/- 25.00m (speed 0.01 mps / course 96.90) @ 23.11.2022 15:39:57 GMT+03:00

2022-11-23 15:39:57.978 ℹ️-[TSConfig persist] 

2022-11-23 15:39:57.980 🔵-[TSConfig incrementOdometer:] 15934.9

2022-11-23 15:39:57.980 🔵-[TSLocationManager startMonitoringStationaryRegion:radius:] Radius: 50

2022-11-23 15:39:57.981 🔴-[TSLocationManager stopUpdatingLocation] 

2022-11-23 15:39:57.982 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:39:58.009 🔵-[TSLocationManager log:message:] [onMotionChange]

2022-11-23 15:39:58.009 🔵-[TSLocationManager log:message:] [onLocation]

2022-11-23 15:39:58.009 🔵-[TSLocationManager log:message:] start bg task desc: [onMotionChange], timestamp: 1669207197000

2022-11-23 15:39:58.009 ✅-[BackgroundTaskManager createBackgroundTask] 25

2022-11-23 15:39:58.019 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 1FAAB7EE-17C4-4B09-81DE-18439F07AA0F

2022-11-23 15:39:58.019 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:58.019 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:58.020 🔵-[TSLocationManager log:message:] success bg task: 25

2022-11-23 15:39:58.020 🔵-[TSLocationManager log:message:] start bg task desc: [onLocation], timestamp: 1669207197000

2022-11-23 15:39:58.020 ✅-[BackgroundTaskManager createBackgroundTask] 26

2022-11-23 15:39:58.034 🔵-[TSLocationManager log:message:] success bg task: 26

2022-11-23 15:39:58.339 🔵-[TSLocationManager log:message:] success send location request 24

2022-11-23 15:39:58.339 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 24 OF (
    24,
    25,
    26
)

2022-11-23 15:39:58.519 🔵-[TSLocationManager log:message:] success send location request 26

2022-11-23 15:39:58.521 🔵-[TSLocationManager log:message:] success send location request 25

2022-11-23 15:39:58.554 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 26 OF (
    25,
    26
)

2022-11-23 15:39:58.554 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 25 OF (
    25
)

2022-11-23 15:39:59.617 ℹ️-[TSDBLogger db_save] Log committed

======= after this action i opened the app and killed again create new logs,, =======

2022-11-23 15:39:59.753 ℹ️-[TSDBLogger db_save] Log committed

2022-11-23 15:39:59.833 ℹ️-[TSLog destroy] SUCCESS

2022-11-23 15:39:59.973 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/100 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:39:59.973 🔵-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Query location-state will trigger in 10 seconds...

2022-11-23 15:39:59.978 🔵-[TSLocationManager log:message:] [iosActivityChangeSubscription]

2022-11-23 15:40:05.814 ℹ️-[TSDBLogger db_delete] maxAge: 604800

2022-11-23 15:40:06.509 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:40:06.509 ℹ️-[TSLocationManager resetMotionTriggerTimer] 

2022-11-23 15:40:06.512 🔵-[TSLocationManager log:message:] [iosActivityChangeSubscription]

2022-11-23 15:40:07.486 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/100 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:40:07.487 🔵-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Query location-state will trigger in 10 seconds...

2022-11-23 15:40:07.491 🔵-[TSLocationManager log:message:] [iosActivityChangeSubscription]

2022-11-23 15:40:11.040 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:40:11.040 ℹ️-[TSLocationManager resetMotionTriggerTimer] 

2022-11-23 15:40:11.042 🔵-[TSLocationManager log:message:] [iosActivityChangeSubscription]

2022-11-23 15:40:11.691 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/100 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:40:11.691 🔵-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Query location-state will trigger in 10 seconds...

2022-11-23 15:40:11.695 🔵-[TSLocationManager log:message:] [iosActivityChangeSubscription]

2022-11-23 15:40:13.594 🔵-[TSLocationManager onSuspend:] enabled? 1)

2022-11-23 15:40:13.819 ℹ️-[TSLocationManager init] 
╔═════════════════════════════════════════════
║ TSLocationManager (build 387)
╠══════════════════════════════════════════════
{
    activityRecognitionInterval = 10000;
    activityType = 1;
    authorization =     {
    };
    autoSync = 1;
    autoSyncThreshold = 0;
    batchSync = 0;
    debug = 1;
    desiredAccuracy = "-1";
    desiredOdometerAccuracy = 100;
    didDeviceReboot = 0;
    didLaunchInBackground = 0;
    didRequestUpgradeLocationAuthorization = 1;
    disableAutoSyncOnCellular = 0;
    disableElasticity = 0;
    disableLocationAuthorizationAlert = 0;
    disableMotionActivityUpdates = 0;
    disableStopDetection = 0;
    distanceFilter = 10;
    elasticityMultiplier = 1;
    enableTimestampMeta = 0;
    enabled = 1;
    extras =     {
    };
    geofenceInitialTriggerEntry = 1;
    geofenceProximityRadius = 2000;
    geofenceTemplate = "";
    headers =     {
    };
    heartbeatInterval = 60;
    httpRootProperty = location;
    httpTimeout = 60000;
    iOSHasWarnedLocationServicesOff = 0;
    isFirstBoot = 0;
    isMoving = 0;
    lastLocationAuthorizationStatus = 3;
    locationAuthorizationAlert =     {
        cancelButton = Cancel;
        instructions = "To use background location, you must enable '{locationAuthorizationRequest}' in the Location Services settings";
        settingsButton = Settings;
        titleWhenNotEnabled = "Background location is not enabled";
        titleWhenOff = "Location services are off";
    };
    locationAuthorizationRequest = Always;
    locationTemplate = "";
    locationTimeout = 60;
    locationsOrderDirection = ASC;
    logLevel = 5;
    logMaxDays = 3;
    maxBatchSize = "-1";
    maxDaysToPersist = 1;
    maxRecordsToPersist = "-1";
    method = POST;
    minimumActivityRecognitionConfidence = 70;
    odometer = "15934.89860064362";
    params =     {
    };
    pausesLocationUpdatesAutomatically = 1;
    persistMode = 2;
    preventSuspend = 0;
    schedule =     (
    );
    schedulerEnabled = 0;
    showsBackgroundLocationIndicator = 0;
    startOnBoot = 1;
    stationaryRadius = 25;
    stopAfterElapsedMinutes = "-1";
    stopDetectionDelay = 0;
    stopOnStationary = 0;
    stopOnTerminate = 0;
    stopTimeout = 5;
    trackingMode = 1;
    url = "";
    useSignificantChangesOnly = 0;
}

2022-11-23 15:40:13.820 ℹ️-[TSDBLogger db_delete] maxAge: 259200

2022-11-23 15:40:13.822 ℹ️-[GeofenceDAO init] 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 DOUBLE NOT NULL DEFAULT 0, extras TEXT)

2022-11-23 15:40:13.822 ℹ️-[GeofenceDAO init] CREATE index IF NOT EXISTS identifier ON geofences (identifier);CREATE index IF NOT EXISTS latitude ON geofences (latitude);CREATE index IF NOT EXISTS longitude ON geofences (longitude);CREATE index IF NOT EXISTS sin_latitude ON geofences (sin_latitude);CREATE index IF NOT EXISTS cos_latitude ON geofences (cos_latitude);CREATE index IF NOT EXISTS sin_longitude ON geofences (sin_longitude);CREATE index IF NOT EXISTS cos_longitude ON geofences (cos_longitude);

2022-11-23 15:40:13.841 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3

2022-11-23 15:40:13.845 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2022-11-23 15:40:13.845 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2022-11-23 15:40:13.845 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2022-11-23 15:40:13.845 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3

2022-11-23 15:40:13.851 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2022-11-23 15:42:46.819 ℹ️-[TSDBLogger db_save] Log committed

2022-11-23 15:42:46.847 🔵-[TSLocationManager locationManager:didExitRegion:] Exit stationary region

2022-11-23 15:42:46.847 🔵-[TSLocationManager setPace:] 1

2022-11-23 15:42:46.847 ℹ️-[TSConfig persist] 

2022-11-23 15:42:46.849 🎾-[SOMotionDetector startShakeDetection:] sample-rate: 0.2 | M7 DISABLED

2022-11-23 15:42:46.854 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2022-11-23 15:42:46.872 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2022-11-23 15:42:46.879 
📍<+40.99889575,+29.08166901> +/- 35.00m (speed -1.00 mps / course -1.00) @ 23.11.2022 15:42:46 GMT+03:00

2022-11-23 15:42:46.879 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: -1.0m | age: 0.1s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:42:46.879 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+40.99889575,+29.08166901> +/- 35.00m (speed -1.00 mps / course -1.00) @ 23.11.2022 15:42:46 GMT+03:00

2022-11-23 15:42:46.879 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2022-11-23 15:42:46.879 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 35.0

2022-11-23 15:42:46.880 🎾-[TSLocationManager startMonitoringSignificantLocationChanges] 

2022-11-23 15:42:46.880 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2022-11-23 15:42:46.916 ✅-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS

2022-11-23 15:42:46.941 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 19C79679-1910-45D9-A65B-BA8035FF0630

2022-11-23 15:42:46.941 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:42:46.945 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:42:51.358 
📍<+40.99880633,+29.08165510> +/- 24.00m (speed 1.46 mps / course -1.00) @ 23.11.2022 15:42:51 GMT+03:00

2022-11-23 15:42:51.358 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.1s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:42:51.358 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 29.5

2022-11-23 15:42:51.382 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: AE656D34-A4DC-4CA3-A1D7-A44EC0A90B2F

2022-11-23 15:42:51.382 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:42:51.382 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:42:56.380 
📍<+40.99881466,+29.08178587> +/- 25.00m (speed 1.88 mps / course -1.00) @ 23.11.2022 15:42:56 GMT+03:00

2022-11-23 15:42:56.380 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.1s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:42:56.381 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:42:56.397 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 14508AE7-DF0B-4E79-93AC-99636FEF89B6

2022-11-23 15:42:56.397 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:42:56.397 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:42:57.874 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:42:57.874 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 34

2022-11-23 15:43:08.875 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:08.883 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 44

2022-11-23 15:43:15.923 
📍<+40.99872409,+29.08177234> +/- 25.00m (speed 0.89 mps / course 146.73) @ 23.11.2022 15:43:15 GMT+03:00

2022-11-23 15:43:15.923 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.1s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:15.923 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:43:15.953 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: FA121E82-B4BA-4A79-8FC0-AEE5DE359836

2022-11-23 15:43:15.953 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:15.953 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:19.872 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:19.872 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 33

2022-11-23 15:43:23.942 
📍<+40.99863155,+29.08176987> +/- 25.00m (speed 0.68 mps / course 169.97) @ 23.11.2022 15:43:23 GMT+03:00

2022-11-23 15:43:23.942 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.1s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:23.943 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:43:23.943 ℹ️-[TSConfig persist] 

2022-11-23 15:43:23.948 🔵-[TSConfig incrementOdometer:] 15965.4

2022-11-23 15:43:23.970 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: A5618C1E-4AB6-44D0-A533-7B8A520D3EB3

2022-11-23 15:43:23.970 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:23.971 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:30.874 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:30.874 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 26

2022-11-23 15:43:33.955 
📍<+40.99854654,+29.08182203> +/- 32.00m (speed -1.00 mps / course -1.00) @ 23.11.2022 15:43:33 GMT+03:00

2022-11-23 15:43:33.955 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.2s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:33.955 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:43:33.976 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: E95CA9F4-A8BF-4784-A33F-8E1A6F87EB7F

2022-11-23 15:43:33.977 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:33.977 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:41.874 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | shaking/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:41.874 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 31

2022-11-23 15:43:47.557 ℹ️-[TSDBLogger db_save] Log committed

2022-11-23 15:43:52.873 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | shaking/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:43:52.873 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 15

2022-11-23 15:44:00.109 
📍<+40.99849460,+29.08157314> +/- 35.00m (speed -1.00 mps / course -1.00) @ 23.11.2022 15:44:00 GMT+03:00

2022-11-23 15:44:00.109 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 10.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:00.109 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 25.0

2022-11-23 15:44:00.129 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: C81A31DD-C79D-41C3-A1CD-51B39B83E27E

2022-11-23 15:44:00.129 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:00.129 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:03.873 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | shaking/0 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:03.873 🔵-[TSLocationManager createMotionTypeChangedHandler]_block_invoke Shake count: 1

2022-11-23 15:44:04.952 🔵-[TSLocationManager onResume:] enabled? 1

2022-11-23 15:44:09.545 ℹ️-[TSLocationManager log:message:] [RNBackgroundGeolocation startObserving]

2022-11-23 15:44:09.545 ℹ️-[TSLocationManager on:success:failure:] location

2022-11-23 15:44:09.545 ℹ️-[TSLocationManager on:success:failure:] motionchange

2022-11-23 15:44:09.545 ℹ️-[TSLocationManager on:success:failure:] activitychange

2022-11-23 15:44:09.545 ℹ️-[TSLocationManager on:success:failure:] heartbeat

2022-11-23 15:44:09.545 ℹ️-[TSGeofenceManager onGeofence:] 

2022-11-23 15:44:09.545 ℹ️-[TSGeofenceManager onGeofencesChange:] 

2022-11-23 15:44:09.545 ℹ️-[TSLocationManager on:success:failure:] http

2022-11-23 15:44:09.545 ℹ️-[TSLocationManager on:success:failure:] providerchange

2022-11-23 15:44:09.545 ℹ️-[TSLocationManager on:success:failure:] schedule

2022-11-23 15:44:09.545 ℹ️-[TSLocationManager on:success:failure:] powersavechange

2022-11-23 15:44:09.545 ℹ️-[TSHttpService onConnectivityChange:] 

2022-11-23 15:44:09.545 ℹ️-[TSLocationManager on:success:failure:] enabledchange

2022-11-23 15:44:09.545 ℹ️-[TSHttpService onAuthorization:] 

2022-11-23 15:44:09.549 ℹ️-[TSConfig persist] 

2022-11-23 15:44:09.552 ℹ️-[TSConfig persist] 

2022-11-23 15:44:09.555 ℹ️-[TSConfig persist] 

2022-11-23 15:44:09.556 🔵-[TSLocationManager ready] 

2022-11-23 15:44:09.557 ℹ️-[TSLocationManager doStart:] trackingMode: 1

2022-11-23 15:44:09.558 ℹ️-[TSLocationManager loadLastOdometerLocation] <+40.99863155,+29.08176987> +/- -1.00m (speed -1.00 mps / course -1.00) @ 23.11.2022 15:44:09 GMT+03:00

2022-11-23 15:44:09.558 🎾-[TSGeofenceManager start] 

2022-11-23 15:44:09.559 🎾-[SOMotionDetector startDetection] 

2022-11-23 15:44:09.559 🔵-[TSLocationManager setPace:] 0

2022-11-23 15:44:09.559 🔴-[SOMotionDetector stopShakeDetection] OFF

2022-11-23 15:44:09.560 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2022-11-23 15:44:09.585 🔵-[TSLocationManager log:message:] [onProviderChange]

2022-11-23 15:44:09.586 🔵-[TSLocationManager log:message:] [onLocation]

2022-11-23 15:44:09.586 🔵-[TSLocationManager log:message:] [startIOSListener]

2022-11-23 15:44:09.586 🔵-[TSLocationManager log:message:] start bg task desc: [onLocation], timestamp: 1669207440000

2022-11-23 15:44:09.591 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:09.591 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:09.596 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2022-11-23 15:44:09.596 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON

2022-11-23 15:44:09.618 ✅-[BackgroundTaskManager createBackgroundTask] 20

2022-11-23 15:44:09.625 🔵-[TSLocationManager log:message:] success bg task: 20

2022-11-23 15:44:09.647 ⚠️-[TSLocationManager start] Already started (ignored)

2022-11-23 15:44:09.655 ℹ️-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke Configured BackgroundFetch

2022-11-23 15:44:09.718 ✅-[SOMotionDetector startDetection]_block_invoke Enabled M7 MotionActivity updates

2022-11-23 15:44:09.720 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:09.721 🔵-[TSLocationManager log:message:] [iosActivityChangeSubscription]

2022-11-23 15:44:09.730 
📍<+40.99856938,+29.08154987> +/- 40.00m (speed -1.00 mps / course -1.00) @ 23.11.2022 15:44:09 GMT+03:00

2022-11-23 15:44:09.730 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:09.730 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+40.99856938,+29.08154987> +/- 40.00m (speed -1.00 mps / course -1.00) @ 23.11.2022 15:44:09 GMT+03:00

2022-11-23 15:44:09.730 ℹ️-[TSConfig persist] 

2022-11-23 15:44:09.731 🔵-[TSConfig incrementOdometer:] 15985.2

2022-11-23 15:44:09.732 🔵-[TSLocationManager startMonitoringStationaryRegion:radius:] Radius: 65

2022-11-23 15:44:09.732 🔴-[TSLocationManager stopUpdatingLocation] 

2022-11-23 15:44:09.732 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 40.0

2022-11-23 15:44:09.737 🔵-[TSLocationManager log:message:] [onMotionChange]

2022-11-23 15:44:09.737 🔵-[TSLocationManager log:message:] [onLocation]

2022-11-23 15:44:09.737 🔵-[TSLocationManager log:message:] start bg task desc: [onMotionChange], timestamp: 1669207449000

2022-11-23 15:44:09.738 ✅-[BackgroundTaskManager createBackgroundTask] 21

2022-11-23 15:44:09.745 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: B988847F-0084-47AB-978C-9B2BC51303E3

2022-11-23 15:44:09.745 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:09.745 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:09.755 🔵-[TSLocationManager log:message:] success bg task: 21

2022-11-23 15:44:09.755 🔵-[TSLocationManager log:message:] start bg task desc: [onLocation], timestamp: 1669207449000

2022-11-23 15:44:09.755 ✅-[BackgroundTaskManager createBackgroundTask] 22

2022-11-23 15:44:09.760 🔵-[TSLocationManager log:message:] success bg task: 22

2022-11-23 15:44:09.878 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/100 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:09.878 🔵-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Query location-state will trigger in 10 seconds...

2022-11-23 15:44:09.880 🔵-[TSLocationManager log:message:] [iosActivityChangeSubscription]

2022-11-23 15:44:10.812 🔵-[TSLocationManager log:message:] success send location request 21

2022-11-23 15:44:10.813 🔵-[TSLocationManager log:message:] success send location request 20

2022-11-23 15:44:10.820 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 21 OF (
    20,
    21,
    22
)

2022-11-23 15:44:10.820 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 20 OF (
    20,
    22
)

2022-11-23 15:44:10.857 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:10.857 ℹ️-[TSLocationManager resetMotionTriggerTimer] 

2022-11-23 15:44:10.858 🔵-[TSLocationManager log:message:] [iosActivityChangeSubscription]

2022-11-23 15:44:11.508 
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/100 | isMoving: 1
╚═══════════════════════════════════════════════════════════

2022-11-23 15:44:11.509 🔵-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Query location-state will trigger in 10 seconds...

2022-11-23 15:44:11.510 🔵-[TSLocationManager log:message:] [iosActivityChangeSubscription]

2022-11-23 15:44:11.512 🔵-[TSLocationManager log:message:] success send location request 22

2022-11-23 15:44:11.522 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 22 OF (
    22
)

christocracy commented 1 year ago

Are you aware that an iOS app needs to move at least 200 meters after being terminated before tracking resumes?

See API docs Config.stopOnTerminate.

ibrahimakar commented 1 year ago

Thank you for reply, Yes, app starts at background and i show the local moving notifications after 200m walks. i think there is no problem to wake up app, but in onLocation listener i call the my post api but there is no action there. On the other hand i emailed the logs, because i added Log in onLocation listener and only shown and post api success when i open the app?

I think, i missed something at configuration. But i dont know what is.

=== EDIT ====

In Simulator everything is OK. when terminated app, and sim in Freeway Drive Loc, it wakes up and posting server

=== EDIT === i recorded new action log; Until 2022-11-23 18:13:26.400 when the application is terminated and then the application is opened and backgrounded..

background-geolocation 3.log

christocracy commented 1 year ago

I just added a BackgroundGeolocation.logger.debug("*** [onLocation]") in my demo app and went for a walk around the neighbourhood after first launching the app then terminating it.

Arriving home, I see all my log messages in the logs.

2022-11-23 09:43:28.248 ℹ️-[TSLocationManager log:message:] *** [onLocation]: 45.51885302539379, -73.60050129930512

I also see that my data arrived at my server.

I suggest you ensure that BackgroundGeolocation.ready(config) is called each time your app launches, no matter what.

christocracy commented 1 year ago

Also note: in my demo app, I draw map markers on the map using onLocation. If this event somehow wasn't being called, I wouldn't see map-markers on the map. It would be very obvious that something was wrong.

ibrahimakar commented 1 year ago

I also think, plugin has no problem. i think there is missing part my configuration (such as I just realized, I didn't choose a background prroccessing mode on infi.plist) and i went for a tip around the neighbourhood. and crate an new log but again there is no record in db. background-geolocation 4.log

can you share an code snippet, which is post external http service used in onLocation listener? or i know there are lots of information on documentation and i read lots of them about my request, can you let me know if there is a critical setting that I need to pay attention to?

It confuses me that there is no problem while in the simulator but device is

i noticed log inserted ║ -[TSHttpService finish:error:] Success: 0 but i did not use http service of plugin.

ibrahimakar commented 1 year ago

also, I opened the app and closed it right away and then went around, that could be a problem? these are notifications of my last trip

christocracy commented 1 year ago

I have no idea what your problem is.

I suggest you build a simple Hello World app and test it.

talal-tilted commented 1 year ago

@ibrahimakar did you find any solutions ? i have exactly the same problem. It seems like, onLocation method is not being called in background (when app is killed). However, push notifications with every informations are received when app is killed.

I am in debug mode, can not figure out what part of configuration i am missing .. I just created a bare new project, that is the only thing that i am doing in the app as it is a POC ..

christocracy commented 1 year ago

Publish your “POC” tk a public repo so I can see it.

ibrahimakar commented 1 year ago

hi @talal-tilted yes i found a solution, but i dont know it is relevant with this situation i actually know onLocation subscrioption work succesfully but i didnt post location with my api. i used BackgroundGeolocation.startBackgroundTask() got sending location to api and it works.

talal-tilted commented 1 year ago

Thanks @christocracy and @ibrahimakar for quick reply. My problem was a bit different, i fixed it. The problem was the React Native packager not connecting / receiving log. So i took my laptop and device in a car and took a ride and everything's was working well !

Thanks again !