Closed ironmanromeo closed 2 years ago
When you see this in the logs:
02-02 14:47:34.370 INFO [LoggerFacade$a a]
╔═════════════════════════════════════════════
║ TSLocationManager version: 3.1.35 (391)
╠═════════════════════════════════════════════
╟─ HUAWEI JSN-L21 @ 9 (react-native)
Your app has relaunched after the OS has terminated your app. There's nothing the plugin can do to prevent the OS terminating an app in the background. Huawei is one of the worst offenders for dirty tricks like this. See https://dontkillmyapp.com
I'm running a test on my Google Pixel 3a with app running in the background:
BackgroundGeolocation.ready({
stopTimeout: 60,
locationAuthorizationRequest: 'WhenInUse',
distanceFilter: 0,
locationUpdateInterval: 1000
}).then((state) => {
BackgroundGeolocation.changePace(true);
});
I'm seeing a location update every second with the app minimized and screen off.
In log file we found that activity tracking stops here: 02-02 14:41:42.583 DEBUG [AbstractService a] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true]
This is a normal thing to see in the logs. This is merely the plugin's foreground-service asking the question "Should I stop?". When sticky: true
, the answer will be NO. "sticky" means "stay alive".
30 minutes sitting in the background with screen off and the plugin continues to operate with WhenInUse
, recording a location every second.
Ok. We have the same issue on iOS: I mean: now we should stop tracking service, save track, delete and then re-start without leaving the app. Android seem to be ok, iOS no. Can you try the same? Stop and the re-start. Thx
BackgroundGeolocation.ready({
debug: false,
stopTimeout: 60,
locationAuthorizationRequest: 'WhenInUse',
distanceFilter: 0,
pausesLocationUpdatesAutomatically: false,
disableStopDetection: true
}).then((state) => {
BackgroundGeolocation.changePace(true);
});
I let it run for 60 minutes so far, I still see the blue location indicator activated, signally the app is still alive in the background and the plugin continuing to record location.
Bringing the app to foreground, I see the locations that were recorded over the last hour drawn upon the map.
There is no issue with iOS.
Check this log:
There are 2 start, the first at App start, the second after stopping and re-starting the service:
2022-02-02 18:59:42.813 🔵-[BackgroundTaskManager onPreventSuspendTimer:] Prevent-suspend timer fired! (bg time remaining: 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000)
after Prevent-suspend timer fired!
then more down...
2022-02-02 19:01:57.139 ⚠️-[BackgroundTaskManager createBackgroundTask]_block_invoke FORCE KILL BACKGROUND TASK: 5, remaining time: 3.864035
I can't post another log but I can resume:
In this log at a certain point I found:
2022-02-02 18:59:42.813 🔵-[BackgroundTaskManager onPreventSuspendTimer:] Prevent-suspend timer fired! (bg time remaining: 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000)
them more down...
2022-02-02 19:01:57.139 ⚠️-[BackgroundTaskManager createBackgroundTask]_block_invoke FORCE KILL BACKGROUND TASK: 5, remaining time: 3.864035
2022-02-02 19:01:57.139 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 5 OF (
Service at this point is OFF (no more BLUE tag).
iPhone settings are:
const MacSettings = {
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
preventSuspend: true,
heartbeatInterval: 60,
stopTimeout: 60*10,
locationAuthorizationRequest: 'WhenInUse',
debug: false,
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
//transistorAuthorizationToken: token,
distanceFilter: 10,
isMoving:true,
pausesLocationUpdatesAutomatically:false,
showsBackgroundLocationIndicator:true,
disableStopDetection:true
}
At restart service I force settings with:
const settings = platformSettings()
BackgroundGeolocation.setConfig(settings).then((state)=>{
console.log(state)
})
supposing stopTimeout should re-start from the beginning.
Now I'll try your configuration.
Forget about preventSuspend. You don’t need it and it doesn’t work with WhenInUse. It is not necessary when location-services are continually on (pausesLocationUpdatesAutomatically).
to use WhenInUse to track in the background, you MUST call .changePace(true)
while your app is in the foreground. You cannot only call .start()
.
const state = await BackgroundGeolocation.ready({
stopTimeout: 60,
locationAuthorizationRequest: 'WhenInUse',
distanceFilter: 0,
locationUpdateInterval: 1000
})
await BackgroundGeolocation.changePace(true);
const onClickEnable = (value) => {
(async () => {
setEnabled(value);
if (value) {
await BackgroundGeolocation.start();
await BackgroundGeolocation.changePace(true)
} else {
await BackgroundGeolocation.changePace(false)
await BackgroundGeolocation.stop();
}
})()
}
I think I should not stop pace ever...
I'm trying this code now....
In the meanwhile...
I disabled
await BackgroundGeolocation.changePace(false)
since before after stopping and re-starting I saw:
2022-02-02 18:59:42.813 🔵-[BackgroundTaskManager onPreventSuspendTimer:] Prevent-suspend timer fired! (bg time remaining: 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000)
and then simbol BLUE disappear.
Now is still alive despite this unsettling message:
022-02-02 20:31:49.606145+0100 mtbmag[1402:480718] [BackgroundTask] Background Task 27 ("Called by mtbmag, from -[BackgroundTaskManager createBackgroundTask]"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this.
This is the log from Xcode with my iPhone 13 PRO connected:
battery: { is_charging: true, level: 1 } }
2022-02-02 20:31:00.901744+0100 mtbmag[1402:481026] [javascript] @@@@@@@@ passato: {"coords":{"altitude":220.4,"latitude":45.64565116945627,"heading":-1,"altitude_accuracy":13.1,"heading_accuracy":-1,"accuracy":13.6,"speed_accuracy":-1,"longitude":9.214478058922504,"speed":-1,"floor":-1},"timestamp":"2022-02-02T19:31:00.844Z","extras":{},"is_moving":true,"uuid":"0EFCBB0B-AAD5-4131-B34C-344CA2078A5E","odometer":54.8,"event":"motionchange","activity":{"confidence":100,"type":"on_foot"},"battery":{"is_charging":true,"level":1}}
2022-02-02 20:31:02.017558+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 33 }
2022-02-02 20:31:02.345575+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'on_foot', confidence: 100 }
2022-02-02 20:31:04.595817+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 33 }
2022-02-02 20:31:07.818794+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 100 }
2022-02-02 20:31:08.461637+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 100 }
2022-02-02 20:31:49.606145+0100 mtbmag[1402:480718] [BackgroundTask] Background Task 27 ("Called by mtbmag, from -[BackgroundTaskManager createBackgroundTask]"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this.
2022-02-02 20:32:56.209203+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 100 }
2022-02-02 20:33:02.663375+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 100 }
2022-02-02 20:33:09.427922+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 33 }
2022-02-02 20:33:12.640687+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 33 }
2022-02-02 20:33:13.933511+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 100 }
2022-02-02 20:33:46.207560+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 33 }
2022-02-02 20:33:49.421082+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 33 }
2022-02-02 20:33:50.070104+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 100 }
2022-02-02 20:37:21.732675+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 33 }
2022-02-02 20:37:24.948670+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 33 }
2022-02-02 20:37:26.883742+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 100 }
2022-02-02 20:38:20.763856+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 33 }
2022-02-02 20:38:23.984298+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 100 }
2022-02-02 20:39:02.701392+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 33 }
2022-02-02 20:39:05.914056+0100 mtbmag[1402:481026] [javascript] '[onActivityChange]', { activity: 'still', confidence: 33 }
It looks like the plug-in killed the "Background Task 27" process
I'm right?
There is something wrong... still having same issue. I'm checking logs.
after a while app is terminate by the system
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:47:01.219575+0100 mtbmag[1634:540905] [javascript] '[onActivityChange]', { activity: 'still', confidence: 100 }
2022-02-02 22:47:01.864405+0100 mtbmag[1634:540899]
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:47:01.865409+0100 mtbmag[1634:541594] 🔵-[BackgroundTaskManager startPreventSuspendTimer:] BG time remaining: 29 | Total tasks: 1
2022-02-02 22:47:02.287069+0100 mtbmag[1634:540905] [javascript] '[onActivityChange]', { activity: 'still', confidence: 100 }
2022-02-02 22:47:05.089280+0100 mtbmag[1634:540896]
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:47:05.375626+0100 mtbmag[1634:540905] [javascript] '[onActivityChange]', { activity: 'still', confidence: 100 }
2022-02-02 22:47:21.262449+0100 mtbmag[1634:540896] 🔵-[BackgroundTaskManager onPreventSuspendTimer:] Prevent-suspend timer fired! (bg time remaining: 9.962479)
2022-02-02 22:47:21.264441+0100 mtbmag[1634:541594] ℹ️+[LocationAuthorization run:onCancel:] status: 4
2022-02-02 22:47:28.679886+0100 mtbmag[1634:540614] [BackgroundTask] Background task still not ended after expiration handlers were called: <_UIBackgroundTaskInfo: 0x282598c40>: taskID = 13, taskName = Called by mtbmag, from -[BackgroundTaskManager createBackgroundTask], creationTime = 52204 (elapsed = 929). This app will likely be terminated by the system. Call UIApplication.endBackgroundTask(_:) to avoid this.
2022-02-02 22:47:28.679922+0100 mtbmag[1634:540899] ⚠️-[BackgroundTaskManager createBackgroundTask]_block_invoke FORCE KILL BACKGROUND TASK: 13, remaining time: 2.544883
2022-02-02 22:47:28.680554+0100 mtbmag[1634:540899] ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 13 OF (
13
)
Stop using preventSuspend. It doesn’t work with WhenInUse.
I started previous job with this config. Where do you see it?
const MacSettings = {
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
stopTimeout: 60,
locationAuthorizationRequest: 'WhenInUse',
distanceFilter: 0,
locationUpdateInterval: 1000
}
{
activityRecognitionInterval = 10000;
activityType = 1;
authorization = {
};
autoSync = 1;
autoSyncThreshold = 0;
batchSync = 0;
debug = 0;
desiredAccuracy = "-2";
desiredOdometerAccuracy = 100;
didDeviceReboot = 0;
didLaunchInBackground = 0;
didRequestUpgradeLocationAuthorization = 0;
disableAutoSyncOnCellular = 0;
disableElasticity = 0;
disableLocationAuthorizationAlert = 0;
disableMotionActivityUpdates = 0;
disableStopDetection = 0;
distanceFilter = 0;
elasticityMultiplier = 1;
enableTimestampMeta = 0;
enabled = 1;
extras = {
};
geofenceInitialTriggerEntry = 1;
geofenceProximityRadius = 2000;
geofenceTemplate = "";
headers = {
};
heartbeatInterval = 60;
httpRootProperty = location;
httpTimeout = 60000;
iOSHasWarnedLocationServicesOff = 0;
isFirstBoot = 1;
isMoving = 0;
lastLocationAuthorizationStatus = 4;
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 = WhenInUse;
locationTemplate = "";
locationTimeout = 60;
locationsOrderDirection = ASC;
logLevel = 5;
logMaxDays = 3;
maxBatchSize = "-1";
maxDaysToPersist = 1;
maxRecordsToPersist = "-1";
method = POST;
minimumActivityRecognitionConfidence = 70;
odometer = "10.94697496611075";
params = {
};
pausesLocationUpdatesAutomatically = 1;
persistMode = 2;
preventSuspend = 0;
schedule = (
);
schedulerEnabled = 0;
showsBackgroundLocationIndicator = 0;
startOnBoot = 0;
stationaryRadius = 25;
stopAfterElapsedMinutes = "-1";
stopDetectionDelay = 0;
stopOnStationary = 0;
stopOnTerminate = 1;
stopTimeout = 60;
trackingMode = 1;
url = "";
useSignificantChangesOnly = 0;
}
I started previous job with this config. Where do you see it?
const MacSettings = { logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE, desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION, stopTimeout: 60, locationAuthorizationRequest: 'WhenInUse', distanceFilter: 0, locationUpdateInterval: 1000 }
Look at the Config I posted above during my iOS test. You are going around in circles. Read the API docs Config.pausesLocationUpdatesAutomatically
. Read the iOS docs for this parameter directly from Apple
ops... I made a mistake in copying and pasting from your code. Now I'm testing:
const MacSettings = {
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
stopTimeout: 60,
locationAuthorizationRequest: 'WhenInUse',
distanceFilter: 0,
pausesLocationUpdatesAutomatically:false,
disableStopDetection:true
}
Dead after 5 minutes:
{
activityRecognitionInterval = 10000;
activityType = 1;
authorization = {
};
autoSync = 1;
autoSyncThreshold = 0;
batchSync = 0;
debug = 0;
desiredAccuracy = "-2";
desiredOdometerAccuracy = 100;
didDeviceReboot = 0;
didLaunchInBackground = 0;
didRequestUpgradeLocationAuthorization = 0;
disableAutoSyncOnCellular = 0;
disableElasticity = 0;
disableLocationAuthorizationAlert = 0;
disableMotionActivityUpdates = 0;
disableStopDetection = 1;
distanceFilter = 0;
elasticityMultiplier = 1;
enableTimestampMeta = 0;
enabled = 0;
extras = {
};
geofenceInitialTriggerEntry = 1;
geofenceProximityRadius = 2000;
geofenceTemplate = "";
headers = {
};
heartbeatInterval = 60;
httpRootProperty = location;
httpTimeout = 60000;
iOSHasWarnedLocationServicesOff = 0;
isFirstBoot = 1;
isMoving = 0;
lastLocationAuthorizationStatus = 4;
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 = WhenInUse;
locationTemplate = "";
locationTimeout = 60;
locationsOrderDirection = ASC;
logLevel = 5;
logMaxDays = 3;
maxBatchSize = "-1";
maxDaysToPersist = 1;
maxRecordsToPersist = "-1";
method = POST;
minimumActivityRecognitionConfidence = 70;
odometer = "31.16154209478744";
params = {
};
pausesLocationUpdatesAutomatically = 0;
persistMode = 2;
preventSuspend = 0;
schedule = (
);
schedulerEnabled = 0;
showsBackgroundLocationIndicator = 0;
startOnBoot = 0;
stationaryRadius = 25;
stopAfterElapsedMinutes = "-1";
stopDetectionDelay = 0;
stopOnStationary = 0;
stopOnTerminate = 1;
stopTimeout = 60;
trackingMode = 1;
url = "";
useSignificantChangesOnly = 0;
}
LOGS:
2022-02-02 22:31:33.240 ℹ️-[TSConfig persist]
2022-02-02 22:31:33.243 🔵-[TSLocationManager ready]
2022-02-02 22:31:36.036 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 4
2022-02-02 22:31:36.037 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 4
2022-02-02 22:31:36.038 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 4
2022-02-02 22:31:36.044 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 4
2022-02-02 22:31:36.045 ℹ️-[TSConfig persist]
2022-02-02 22:31:36.047 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 4
2022-02-02 22:31:40.675
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager start]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:40.675 ℹ️-[TSLocationManager doStart:] trackingMode: 1
2022-02-02 22:31:40.675 ℹ️-[TSConfig persist]
2022-02-02 22:31:40.675 ℹ️-[TSConfig persist]
2022-02-02 22:31:40.675 🎾-[TSGeofenceManager start]
2022-02-02 22:31:40.676 🔵-[TSLocationManager changePace:] isMoving: 1
2022-02-02 22:31:40.676 🔵-[TSLocationManager setPace:] 1
2022-02-02 22:31:40.676 🎾-[SOMotionDetector startDetection]
2022-02-02 22:31:40.676 🎾-[SOMotionDetector startShakeDetection:] sample-rate: 0.2 | M7 DISABLED
2022-02-02 22:31:40.676 🔵-[TSLocationManager setPace:] 1
2022-02-02 22:31:40.676 🎾-[SOMotionDetector startShakeDetection:] sample-rate: 0.2 | M7 DISABLED
2022-02-02 22:31:40.678 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON
2022-02-02 22:31:40.679
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:40.679
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:40.680 ℹ️+[LocationAuthorization run:onCancel:] status: 4
2022-02-02 22:31:40.680 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON
2022-02-02 22:31:40.682 ℹ️-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke Configured BackgroundFetch
2022-02-02 22:31:40.686 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON
2022-02-02 22:31:40.686 ℹ️+[LocationAuthorization run:onCancel:] status: 4
2022-02-02 22:31:40.687
📍<+45.64562753,+9.21434174> +/- 6.20m (speed 0.00 mps / course -1.00) @ 02/02/22, 22:31:40 Central European Standard Time
2022-02-02 22:31:40.687
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: -1.0m | age: 0.7s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:40.688 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+45.64562753,+9.21434174> +/- 6.20m (speed 0.00 mps / course -1.00) @ 02/02/22, 22:31:40 Central European Standard Time
2022-02-02 22:31:40.688 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON
2022-02-02 22:31:40.688 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.2
2022-02-02 22:31:40.688 🎾-[TSLocationManager startMonitoringSignificantLocationChanges]
2022-02-02 22:31:40.689 ℹ️+[LocationAuthorization run:onCancel:] status: 4
2022-02-02 22:31:40.690 ✅-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS
2022-02-02 22:31:40.691 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 550AEA9C-78C8-4E1E-A2A9-BC150343E8FE
2022-02-02 22:31:40.691
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:40.691
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:40.794 🔵-[TSLocationManager changePace:] isMoving: 1
2022-02-02 22:31:40.794 🔵-[TSLocationManager setPace:] 1
2022-02-02 22:31:40.794 🎾-[SOMotionDetector startShakeDetection:] sample-rate: 0.2 | M7 DISABLED
2022-02-02 22:31:40.795 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON
2022-02-02 22:31:40.796 ℹ️+[LocationAuthorization run:onCancel:] status: 4
2022-02-02 22:31:41.035
📍<+45.64562737,+9.21434166> +/- 6.55m (speed 0.00 mps / course -1.00) @ 02/02/22, 22:31:41 Central European Standard Time
2022-02-02 22:31:41.035
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: -1.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:41.035 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+45.64562737,+9.21434166> +/- 6.55m (speed 0.00 mps / course -1.00) @ 02/02/22, 22:31:41 Central European Standard Time
2022-02-02 22:31:41.035 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON
2022-02-02 22:31:41.036 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.4
2022-02-02 22:31:41.038 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: D6869A83-6BF0-409E-9E00-8419C52C848D
2022-02-02 22:31:41.038 ℹ️+[LocationAuthorization run:onCancel:] status: 4
2022-02-02 22:31:41.045
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:41.046
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:41.585 🔴-[SOMotionDetector stopShakeDetection] OFF
2022-02-02 22:31:41.585 ✅-[SOMotionDetector startDetection]_block_invoke Enabled M7 MotionActivity updates
2022-02-02 22:31:42.033
📍<+45.64562762,+9.21434107> +/- 6.38m (speed 0.00 mps / course -1.00) @ 02/02/22, 22:31:42 Central European Standard Time
2022-02-02 22:31:42.033
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:42.033 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.5
2022-02-02 22:31:42.041 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 46563B12-C058-47E4-A64A-E37384DB604C
2022-02-02 22:31:42.041
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:42.041
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:43.040
📍<+45.64562791,+9.21434107> +/- 6.41m (speed 0.00 mps / course -1.00) @ 02/02/22, 22:31:43 Central European Standard Time
2022-02-02 22:31:43.040
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:43.040 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.5
2022-02-02 22:31:43.047 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: B5039162-A6D8-4992-8B77-B5C0F5DF9417
2022-02-02 22:31:43.047
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:43.048
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:44.042
📍<+45.64562724,+9.21434040> +/- 6.24m (speed 0.00 mps / course -1.00) @ 02/02/22, 22:31:44 Central European Standard Time
2022-02-02 22:31:44.042
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:44.043 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.4
2022-02-02 22:31:44.051 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 13572B43-D87E-4ACC-B0AD-E1C8C3661725
2022-02-02 22:31:44.053
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:44.053
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:45.039 🔵-[TSLocationManager onSuspend:] enabled? 1)
2022-02-02 22:31:45.047 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:31:45.130
📍<+45.64562598,+9.21433596> +/- 6.50m (speed 0.00 mps / course -1.00) @ 02/02/22, 22:31:45 Central European Standard Time
2022-02-02 22:31:45.130
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.1s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:45.130 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.4
2022-02-02 22:31:45.131 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 4117800C-A966-4EBF-ABB4-4E1CAB2AC7A4
2022-02-02 22:31:45.131
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:45.131
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:46.038
📍<+45.64558489,+9.21434816> +/- 6.06m (speed 0.25 mps / course -1.00) @ 02/02/22, 22:31:46 Central European Standard Time
2022-02-02 22:31:46.038
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:46.039 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.4
2022-02-02 22:31:46.053 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: E3A9D289-9CC7-4821-81AF-2E36F3A33B95
2022-02-02 22:31:46.057
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:46.057
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:47.045
📍<+45.64559951,+9.21436276> +/- 5.82m (speed 0.20 mps / course -1.00) @ 02/02/22, 22:31:47 Central European Standard Time
2022-02-02 22:31:47.054
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:47.054 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.4
2022-02-02 22:31:47.061 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: DBD9A2EC-211E-4B91-AC2B-290D4FBC6BD2
2022-02-02 22:31:47.061
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:47.061
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:48.051
📍<+45.64560271,+9.21436045> +/- 6.60m (speed 0.12 mps / course -1.00) @ 02/02/22, 22:31:48 Central European Standard Time
2022-02-02 22:31:48.051
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:48.052 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.4
2022-02-02 22:31:48.064 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: D6A1026E-409A-4D18-B622-C61804CF143D
2022-02-02 22:31:48.064
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:48.064
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:49.043
📍<+45.64557936,+9.21433086> +/- 7.31m (speed 1.17 mps / course 215.00) @ 02/02/22, 22:31:49 Central European Standard Time
2022-02-02 22:31:49.043
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:49.044 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.3
2022-02-02 22:31:49.061 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: B5711D17-7CB1-4D28-9FB7-3C6F5F9B61E7
2022-02-02 22:31:49.061
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:49.061
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:49.493
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:49.494 🔵-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Stop-detection will trigger in 10 seconds...
2022-02-02 22:31:50.039
📍<+45.64558292,+9.21433144> +/- 7.31m (speed 0.76 mps / course -1.00) @ 02/02/22, 22:31:50 Central European Standard Time
2022-02-02 22:31:50.039
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:50.040 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.2
2022-02-02 22:31:50.054 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: CBA3628C-C1FD-427D-90BD-75B2A6A64BDD
2022-02-02 22:31:50.054
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:50.054
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:52.041
📍<+45.64558672,+9.21433490> +/- 8.66m (speed 0.25 mps / course -1.00) @ 02/02/22, 22:31:52 Central European Standard Time
2022-02-02 22:31:52.041
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:52.041 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.5
2022-02-02 22:31:52.050 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 50991BB9-ECDC-4312-86A5-3286093B1EAD
2022-02-02 22:31:52.059
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:52.059
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:53.040
📍<+45.64560067,+9.21433576> +/- 8.79m (speed 0.12 mps / course -1.00) @ 02/02/22, 22:31:53 Central European Standard Time
2022-02-02 22:31:53.040
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:53.040 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.1
2022-02-02 22:31:53.049 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: C87BDF4F-3052-48C5-8CBE-7122F9DE1018
2022-02-02 22:31:53.055
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:53.055
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:54.040
📍<+45.64562164,+9.21437040> +/- 8.96m (speed 1.24 mps / course 54.45) @ 02/02/22, 22:31:54 Central European Standard Time
2022-02-02 22:31:54.040
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:54.040 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 6.6
2022-02-02 22:31:54.046 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 07F2DA6F-FE16-4AED-BECD-9F02DAEB2119
2022-02-02 22:31:54.055
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:54.055
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:54.650
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:55.036
📍<+45.64562856,+9.21437874> +/- 8.64m (speed 0.94 mps / course -1.00) @ 02/02/22, 22:31:55 Central European Standard Time
2022-02-02 22:31:55.036
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:55.037 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 7.3
2022-02-02 22:31:55.051 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 8D110BDE-6597-49EA-A154-DA47DA64B09D
2022-02-02 22:31:55.057
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:55.057
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:56.040
📍<+45.64562941,+9.21438021> +/- 7.59m (speed 0.00 mps / course -1.00) @ 02/02/22, 22:31:56 Central European Standard Time
2022-02-02 22:31:56.040
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:56.041 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 7.3
2022-02-02 22:31:56.058 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 143DF098-4657-48E6-B9F3-864930FA80F9
2022-02-02 22:31:56.058
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:56.058
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:57.039
📍<+45.64562941,+9.21438021> +/- 6.56m (speed 0.00 mps / course -1.00) @ 02/02/22, 22:31:57 Central European Standard Time
2022-02-02 22:31:57.039
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:57.039 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 7.3
2022-02-02 22:31:57.058 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: E02B3A23-BAB2-44C6-B071-7A5943F33F34
2022-02-02 22:31:57.058
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:57.058
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:57.871
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:58.040
📍<+45.64562941,+9.21438021> +/- 6.01m (speed 0.00 mps / course -1.00) @ 02/02/22, 22:31:58 Central European Standard Time
2022-02-02 22:31:58.041
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:58.041 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 7.3
2022-02-02 22:31:58.047 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 302A0096-082F-44AC-AE47-A49CC47E3826
2022-02-02 22:31:58.051
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:58.051
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:58.516
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:59.034
📍<+45.64562941,+9.21438021> +/- 5.71m (speed 0.00 mps / course -1.00) @ 02/02/22, 22:31:59 Central European Standard Time
2022-02-02 22:31:59.034
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 1 | df: 0.0m | age: 0.0s
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:59.034 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 7.3
2022-02-02 22:31:59.043 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 70334803-56BB-485C-8BBF-772CFA318C3E
2022-02-02 22:31:59.043
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:59.043
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:31:59.496 🔵-[TSLocationManager beginStopDetection] ⏲Stop-timeout engaged: 3600 s...
2022-02-02 22:31:59.506 ✅-[BackgroundTaskManager createBackgroundTask] 13
2022-02-02 22:31:59.506 🎾-[BackgroundTaskManager startKeepAlive]
2022-02-02 22:31:59.506 🔴-[TSLocationManager stopUpdatingLocation]
2022-02-02 22:32:46.008 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:33:46.980 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:34:47.965 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:35:13.061
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:35:17.574
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:35:18.869
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:35:21.118
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:35:24.342
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:35:25.635
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:35:48.618 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:36:33.561 ℹ️-[TSDBLogger db_delete] maxAge: 604800
2022-02-02 22:36:49.572 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:37:50.565 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:38:51.561 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:39:52.561 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:40:53.561 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:41:33.128
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:41:33.602 ℹ️-[TSDBLogger db_delete] maxAge: 604800
2022-02-02 22:41:36.348
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:41:37.322
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:41:53.618 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:42:54.602 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:43:55.564 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:44:56.563 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:45:57.562 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:46:23.830
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:46:28.338
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:46:28.985
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:46:31.882
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:46:33.565 ℹ️-[TSDBLogger db_delete] maxAge: 604800
2022-02-02 22:46:35.425
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:46:40.905
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:46:57.997
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:46:58.566 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 22:47:01.219
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:47:01.864
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:47:01.865 🔵-[BackgroundTaskManager startPreventSuspendTimer:] BG time remaining: 29 | Total tasks: 1
2022-02-02 22:47:05.089
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 22:47:21.262 🔵-[BackgroundTaskManager onPreventSuspendTimer:] Prevent-suspend timer fired! (bg time remaining: 9.962479)
2022-02-02 22:47:21.264 ℹ️+[LocationAuthorization run:onCancel:] status: 4
2022-02-02 22:47:28.680 ⚠️-[BackgroundTaskManager createBackgroundTask]_block_invoke FORCE KILL BACKGROUND TASK: 13, remaining time: 2.544883
2022-02-02 22:47:28.680 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 13 OF (
13
)
2022-02-02 23:33:10.513 🔵-[TSLocationManager onStopTimeout:] stopTimer fired
2022-02-02 23:33:10.513 🔵-[TSLocationManager setPace:] 0
2022-02-02 23:33:10.513 ℹ️-[TSConfig persist]
2022-02-02 23:33:10.519 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON
2022-02-02 23:33:10.520 🔴-[BackgroundTaskManager stopKeepAlive]
2022-02-02 23:33:10.520 ℹ️-[TSLocationManager resetStopTimeoutTimer]
2022-02-02 23:33:10.521 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 23:33:10.523 ℹ️-[TSDBLogger db_delete] maxAge: 604800
2022-02-02 23:33:10.598 🔵-[TSLocationManager onResume:] enabled? 1
2022-02-02 23:33:10.603 ℹ️-[LocationDAO purge:] 1
2022-02-02 23:33:10.606 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 23:33:10.609 ℹ️+[LocationAuthorization run:onCancel:] status: 4
2022-02-02 23:33:10.609 ⚠️-[BackgroundTaskManager stopBackgroundTask:]_block_invoke Failed to find backgroundTask: 13. Ignoring.
2022-02-02 23:33:10.609
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/66 | isMoving: 1
╚═══════════════════════════════════════════════════════════
2022-02-02 23:33:10.610
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 23:33:10.610
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 23:33:10.615
📍<+45.64565117,+9.21447806> +/- 13.63m (speed -1.00 mps / course -1.00) @ 02/02/22, 23:33:09 Central European Standard Time
2022-02-02 23:33:10.615
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 1.5s
╚═══════════════════════════════════════════════════════════
2022-02-02 23:33:10.615 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+45.64565117,+9.21447806> +/- 13.63m (speed -1.00 mps / course -1.00) @ 02/02/22, 23:33:09 Central European Standard Time
2022-02-02 23:33:10.615 ℹ️-[TSConfig persist]
2022-02-02 23:33:10.616 🔵-[TSConfig incrementOdometer:] 10.9
2022-02-02 23:33:10.616 🔵-[TSLocationManager startMonitoringStationaryRegion:radius:] Radius: 25
2022-02-02 23:33:10.617 🔴-[TSLocationManager stopUpdatingLocation]
2022-02-02 23:33:10.617 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 7.6
2022-02-02 23:33:10.618 ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: FA2ED132-097D-4566-8CC1-C99A8F057F9B
2022-02-02 23:33:10.618
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2022-02-02 23:33:10.618
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 23:33:11.350
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/66 | isMoving: 1
╚═══════════════════════════════════════════════════════════
2022-02-02 23:33:14.579
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/66 | isMoving: 1
╚═══════════════════════════════════════════════════════════
2022-02-02 23:33:14.864 ℹ️-[TSDBLogger db_save] Log committed
2022-02-02 23:33:17.160
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/100 | isMoving: 1
╚═══════════════════════════════════════════════════════════
2022-02-02 23:33:17.160 🔵-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Query location-state will trigger in 10 seconds...
2022-02-02 23:33:19.408
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2022-02-02 23:33:19.408 ℹ️-[TSLocationManager resetMotionTriggerTimer]
2022-02-02 23:33:20.050
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | on_foot/100 | isMoving: 1
╚═══════════════════════════════════════════════════════════
2022-02-02 23:33:20.050 🔵-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Query location-state will trigger in 10 seconds...
I have no idea what you're doing wrong. I suggest you clone the demo app and try testing on it in isolation of your own application code.
Ok, in the meanwhile... last 2 test dead after 5 minutes exactly.
And it worked fine for me on the first test today. This Config has existed for about 5 years.
The first good news is that your application works. Good! So now the ball passes to me.
I don't think there are any major differences in the JS part, but I'll go look in depth tomorrow.
Meanwhile, I noticed there is:
[super application: application didFinishLaunchingWithOptions: launchOptions];
called in the middle and not at the end of the block.
[super application: application didFinishLaunchingWithOptions: launchOptions];
// [REQUIRED] Register BackgroundFetch [[TSBackgroundFetch sharedInstance] didFinishLaunching];
I hope to be able to give the good news to the customer tomorrow. In the meantime, thanks for the support!
I only ask the courtesy of closing the issue when I am able (hopefully tomorrow) to understand what is causing the conflict and preventing it from functioning correctly. Thank you again.
I found an error: I was not calling start with await:
BackgroundGeolocation.start() await BackgroundGeolocation.changePace(true)
So sometimes started with correct pace, sometimes not.
now:
await BackgroundGeolocation.start() await BackgroundGeolocation.changePace(true)
Unfortunately, the problem is not solved. After a certain period of time the app is closed by the system (the splash reappears when I bring it back to the foreground).
Looking for discrepancies between the 2 versions, I notice these differences: .1 ours uses Expo, yours doesn't .2 Due to Expo 44 the most recent version of React Native that we can use is "0.64.3". We can remove Expo if that were the problem, but it would take a lot of work and we'd rather avoid it. .3 super didFinishLaunchingWithOptions was called before: [[TSBackgroundFetch sharedInstance] didFinishLaunching]; We have now fixed it and are testing. .4 as already reported some time ago changing libraries and restarting pod-install a problem occurs in the BackgroundFetch header class that I am going to explain below. I solved it by modifying the import but it might not work. .5 I deleted Expo Location that I had accidentally left in a "When in use" privacy check, but which in theory would not (in my opinion) affect normal operation.
/Users/romeomariani/Documents/Lavori/mtb-mag/mtbmag/ios/Pods/Headers/Public/React-Core/React/RCTEventEmitter.h:15:1: error: duplicate interface definition for class 'RCTEventEmitter'
and other errors.
Changing:
#if __has_include("RCTEventEmitter.h")
#import "RCTEventEmitter.h"
#import "RCTLog.h"
#else
#import <React/RCTEventEmitter.h>
#import <React/RCTLog.h>
#endif
in
#import <React/RCTEventEmitter.h>
#import <React/RCTLog.h>
bypassed the error but we do not know if this circumvention compromises normal functioning.
This is our package.json
{
"main": "index.js",
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"web": "expo start --web",
"start": "expo start --dev-client"
},
"dependencies": {
"@expo-google-fonts/inter": "^0.2.0",
"@expo/vector-icons": "^12.0.5",
"@react-native-async-storage/async-storage": "~1.15.14",
"@react-native-community/masked-view": "0.1.11",
"@react-navigation/bottom-tabs": "^6.0.9",
"@react-navigation/drawer": "^6.1.8",
"@react-navigation/native": "^6.0.6",
"@react-navigation/native-stack": "^6.2.5",
"expo": "^44.0.5",
"expo-app-loading": "~1.3.0",
"expo-asset": "~8.4.5",
"expo-constants": "~13.0.0",
"expo-crypto": "~10.1.1",
"expo-file-system": "~13.1.0",
"expo-font": "~10.0.4",
"expo-linking": "~3.0.0",
"expo-localization": "~12.0.0",
"expo-notifications": "~0.14.0",
"expo-screen-orientation": "~4.1.1",
"expo-secure-store": "~11.1.0",
"expo-sensors": "~11.1.0",
"expo-speech": "~10.1.0",
"expo-splash-screen": "~0.14.1",
"expo-sqlite": "~10.1.0",
"expo-status-bar": "~1.2.0",
"expo-updates": "~0.11.3",
"geolib": "^3.3.3",
"gps-to-gpx": "^1.5.1",
"himalaya": "^1.1.0",
"intl": "^1.2.5",
"react": "17.0.2",
"react-devtools": "^4.22.1",
"react-dom": "17.0.2",
"react-hook-form": "^7.22.5",
"react-intl": "^5.24.0",
"react-native": "0.64.3",
"react-native-background-fetch": "^4.0.4",
"react-native-background-geolocation": "^4.4.4",
"react-native-chart-kit": "^6.11.0",
"react-native-dialog": "^9.2.0",
"react-native-elements": "^3.4.2",
"react-native-gesture-handler": "~2.1.0",
"react-native-map-clustering": "^3.4.2",
"react-native-maps": "0.29.4",
"react-native-pager-view": "5.4.9",
"react-native-paper": "^4.11.1",
"react-native-reanimated": "~2.3.1",
"react-native-render-html": "^6.3.1",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.10.1",
"react-native-svg": "12.1.1",
"react-native-tab-view": "^3.1.1",
"react-native-vector-icons": "^9.0.0",
"react-native-web": "0.17.1"
},
"devDependencies": {
"@babel/core": "^7.12.9"
},
"private": true,
"name": "mtbmag",
"version": "1.0.0"
}
Looking at the log the problem occurs here:
2022-02-03 13:16:29.787 ℹ️-[TSDBLogger db_save] Log committed
2022-02-03 13:20:33.511 ℹ️-[TSDBLogger db_delete] maxAge: 259200
Event that starts here: 2022-02-03 12: 58: 34.762 ℹ️- [TSLocationManager init] unexpectedly ends here: 2022-02-03 13: 16: 29.787 ℹ️- [TSDBLogger db_save] Log committed
Unfortunately, the problem also manifests itself in the BGGeolocation demo app. We installed it and took a walk of about 3 km. During the journey the application was put into sleep by the system 5 times as you can see from this video.
Unfortunately we don't have the logs to show because we followed the suggested settings and didn't add debug: true. The problem was also found on our app and that you have the log in the previous post.
This is the only modified file in your app: HelloWorldView.tsx
import React from 'react';
import {
StyleSheet,
Text,
View,
ScrollView,
SafeAreaView
} from 'react-native';
import {Button, Switch, Icon} from "react-native-elements";
import ENV from "../ENV";
import {COLORS} from "../lib/config";
import BackgroundGeolocation, {Subscription} from "../react-native-background-geolocation";
import {registerTransistorAuthorizationListener} from '../lib/Authorization';
//////
/// A simple implementation of the BackgroundGeolocation plugin.
///
///
const HelloWorldView = ({route, navigation}) => {
// Keep a list of BackgroundGeolocation event-subscriptions so we can later remove them
// when the View is destroyed or refreshed during development live-reload.
const bgGeoEventSubscriptions:Subscription[] = [];
const {org, username} = route.params;
/// State.
const [events, setEvents] = React.useState<any[]>([]);
const [enabled, setEnabled] = React.useState(false);
/// Init BackgroundGeolocation when view renders.
/// Return a function to .removeListeners() When view is removed.
React.useEffect(() => {
initBackgroundGeolocation();
registerTransistorAuthorizationListener(navigation);
return () => {
// Remove BackgroundGeolocation event-subscribers when the View is removed or refreshed
// during development live-reload. Without this, event-listeners will accumulate with
// each refresh during live-reload.
unsubscribe();
}
}, []);
/// Add a toggle <Switch> to top-right toolbar.
React.useLayoutEffect(() => {
navigation.setOptions({
headerRight: () => (
<Switch onValueChange={onClickEnable} value={enabled} />
)
});
}, [enabled]);
/// Helper method to push a BackgroundGeolocation subscription onto our list of subscribers.
const subscribe = (subscription:Subscription) => {
bgGeoEventSubscriptions.push(subscription);
}
/// Helper method to unsubscribe from all registered BackgroundGeolocation event-listeners.
const unsubscribe = () => {
bgGeoEventSubscriptions.forEach((subscription:Subscription) => subscription.remove() );
}
/// Configure the BackgroundGeolocation plugin.
const initBackgroundGeolocation = async () => {
// Listen to events. Each BackgroundGeolocation event-listener returns a subscription instance
// with a .remove() method for removing the event-listener. You should collect a list of these
// subcribers and .remove() them all when the View is destroyed or refreshed during dev live-reload.
subscribe(BackgroundGeolocation.onProviderChange((event) => {
console.log('[onProviderChange]', event);
addEvent('onProviderChange', event);
}));
subscribe(BackgroundGeolocation.onLocation((location) => {
console.log('[onLocation]', location);
addEvent('onLocation', location);
}, (error) => {
console.warn('[onLocation] ERROR: ', error);
}));
subscribe(BackgroundGeolocation.onMotionChange((location) => {
console.log('[onMotionChange]', location);
addEvent('onMotionChange', location);
}));
subscribe(BackgroundGeolocation.onGeofence((event) => {
console.log('[onGeofence]', event);
addEvent('onGeofence', event);
}));
subscribe(BackgroundGeolocation.onConnectivityChange((event) => {
console.log('[onConnectivityChange]', event);
addEvent('onConnectivityChange', event);
}));
subscribe(BackgroundGeolocation.onEnabledChange((enabled) => {
console.log('[onEnabledChange]', enabled);
addEvent('onEnabledChange', {enabled: enabled});
}));
subscribe(BackgroundGeolocation.onHttp((event) => {
console.log('[onHttp]', event);
addEvent('onHttp', event);
}));
subscribe(BackgroundGeolocation.onActivityChange((event) => {
console.log('[onActivityChange]', event);
addEvent('onActivityChange', event);
}));
subscribe(BackgroundGeolocation.onPowerSaveChange((enabled) => {
console.log('[onPowerSaveChange]', enabled);
addEvent('onPowerSaveChange', {isPowerSaveMode: enabled});
}));
/// Get an authorization token from demo server at tracker.transistorsoft.com
const token = await BackgroundGeolocation.findOrCreateTransistorAuthorizationToken(org, username, ENV.TRACKER_HOST);
/// Configure the plugin.
BackgroundGeolocation.ready({
debug: false,
stopTimeout: 60,
locationAuthorizationRequest: 'WhenInUse',
distanceFilter: 0,
pausesLocationUpdatesAutomatically: false,
disableStopDetection: true
}).then((state) => {
BackgroundGeolocation.changePace(true);
/// Add the current state as first item in list.
addEvent('Current state', state);
/// Set the default <Switch> state (disabled)
setEnabled(state.enabled);
});
};
/// Adds events to List
const addEvent = (name:string, params:any) => {
let timestamp = new Date();
const event = {
expanded: false,
timestamp: `${timestamp.getMonth()}-${timestamp.getDate()} ${timestamp.getHours()}:${timestamp.getMinutes()}:${timestamp.getSeconds()}`,
name: name,
params: JSON.stringify(params, null, 2)
}
setEvents(previous => [...previous, event]);
}
/// <Switch> handler to toggle the plugin on/off.
const onClickEnable = (value:boolean) => {
(async () => {
setEnabled(value);
if (value) {
await BackgroundGeolocation.start()
await BackgroundGeolocation.changePace(true)
} else {
await BackgroundGeolocation.stop();
}
})()
}
/// Clear events list.
const onClickClear = () => {
setEvents([]);
}
/// Execute getCurrentPosition
const onClickGetCurrentPosition = async () => {
await BackgroundGeolocation.getCurrentPosition({
samples: 1,
extras: {
getCurrentPosition: true
}
});
}
return (
<SafeAreaView style={styles.container}>
<ScrollView style={styles.events}>
{events.slice().reverse().map((event, i) => (
<View style={styles.event} key={i}>
<View style={styles.header}>
<Text style={styles.title}>{event.name}</Text>
<Text style={[styles.title, styles.timestamp]}>{event.timestamp}</Text>
</View>
<View key={i}>
<Text style={styles.params}>{event.params}</Text>
</View>
</View>
))}
</ScrollView>
<View style={styles.bottomToolbar}>
<View style={{justifyContent:'center'}}>
<Button
type="clear"
onPress={onClickGetCurrentPosition}
containerStyle={{width: 60}}
icon={<Icon name='navigate-sharp' type='ionicon' /> }
/>
</View>
<View style={{flex: 1}}></View>
<View style={{justifyContent:'center'}}>
<Button
type="clear"
onPress={onClickClear}
containerStyle={{width: 60}}
icon={<Icon name='trash-sharp' type='ionicon' /> }
/>
</View>
</View>
</SafeAreaView>
);
}
export default HelloWorldView;
const styles = StyleSheet.create({
container: {
flexDirection: 'column',
backgroundColor: COLORS.gold,
flex: 1
},
events: {
flex: 1,
//backgroundColor: '#eee'
},
event: {
backgroundColor: '#fff',
color: '#fff',
marginBottom: 5,
borderWidth: 1,
borderColor: '#000'
},
header: {
backgroundColor: '#000',
padding: 10,
flexDirection:'row',
justifyContent: 'space-between'
},
title: {
flex:1,
fontWeight: 'bold',
color: '#fff'
},
timestamp: {
textAlign: 'right',
fontStyle: 'italic'
},
params: {
fontFamily: 'Courier',
padding: 5
},
bottomToolbar: {
backgroundColor: COLORS.gold,
height: 56,
flexDirection: 'row'
}
});
I just took my SampleApp for a walk to the skating rink (about 1km walk), skated for 50 min, then walked home again.
Tracking was completely successful and did not stop at all during the entire trip (~90min).
Were you using Android or iOS? Because Android is working on our test app, iOS isn't. Romeo installed your sample app on a brand new iphone 13, changing only the file he copied in the post above.
iOS, of course.
I suggest you create a simple “hello world” app with vanilla react-native (not expo). Publish to a public GitHub repo for me to test.
Can you do the same test we did please? Use HelloWorldApp.ts without sending the location, just activate the service in the background and keep it running in the background. We are using iPhone 13 PRO and iPhone 13 with iOS 15. We can send the position (live function) but it is not an obligation, it is an option that the user may or may not activate.
The feeling is that you don't want to understand that we have been trying to explain for a month that your plug-in may (may) have a bug and we are helping you to fix it. Instead of continually questioning what we are doing trying to prove that you are not wrong, read our messages carefully and try to reproduce the problem. We tell you in your interest. I remind you that we have been looking for a solution for a month and we can't figure it out. We are aware that we are most likely at fault, but for a moment please try to take our side and try to help us. Right now we don't feel very followed and I personally start to get tired of having to fight with you on every post.
that your plug-in may (may) have a bug
no it does not. The problem is on your side. Create for me a simple hello world app to test so that we’re both on the same page.
git@gitlab.com:romeo.mariani/bggeolocation-demo-issue.git https://gitlab.com/romeo.mariani/bggeolocation-demo-issue.git
Please try Hello World App, not Advanced App.
git@gitlab.com:romeo.mariani/bggeolocation-demo-issue.git https://gitlab.com/romeo.mariani/bggeolocation-demo-issue.git
Please try Hello World App, not Advanced App.
@christocracy have you tried it?
I assume your demo app isn't working for you either if you don't use the live tracking on iOS, but it's working on Android without live tracking.
Time for a plugin update I guess.
I assume your demo app isn't working for you
Incorrect. I launched it this morning and ran it for 60 min on my desk without issue. I’ll be going out for a field test in a few hours.
I assume your demo app isn't working for you
Incorrect. I launched it this morning and ran it for 60 min on my desk without issue. I’ll be going out for a field test in a few hours.
that's what happens to us too: it works if you don't move around. Let's see what happens when you go for a walk.
How did it go? @christocracy
I have field-tested twice now and reproduced the issue. Stand by while I investigate.
After extensive field-testing, I'm confident there is no issue with the plugin's native Obj-c code in the core library TSLocationManager.xcframework
.
I believe the issue is external to the plugin, either in react-native
or in a 3rd-party dependency, perhaps in conjunction with iOS 15, which is known to have issues with geofencing and significant-location-changes API. The issue is very unusual.
This plugin's core library, TSLocationManager.xcframework
, is used used verbatim within three other development frameworks where the plugin has been ported: Cordova, Capacitor and Flutter. I took my Flutter demo app out identically configured and it has no issues — whatever the issue is, it's isolated within the React Native ecosystem. I will be testing the Cordova and Capacitor versions soon but I'm confident they'll have no issues.
Here is a functioning counter-example that works consistently for me, based upon a freshly generated RN app with no other dependencies other than background-geolocation
and background-fetch
. Note: this app is poorly named WhenInUseNoHooks
because I initially planned to implement it without RN hooks, but I decided to stick with hooks; eg: React.useEffect
, React.useState
, etc.)
To help you I can tell you that this configuration works and is somehow related to the DEBUG command. I know I have set incompatible parameters between them, but somehow it stands, but only if you start from a closed application.
Drawbacks:
const MacSettings = {
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
preventSuspend: true,
heartbeatInterval: 60,
stopTimeout: 60*10,
locationAuthorizationRequest: 'WhenInUse',
debug: true,
logLevel: BackgroundGeolocation.LOG_LEVEL_ERROR,
//transistorAuthorizationToken: token,
distanceFilter: 10,
isMoving:true,
pausesLocationUpdatesAutomatically:false,
disableStopDetection:true
}
...
const onClickEnable = (value) => {
(async () => {
setEnabled(value);
if (value) {
await BackgroundGeolocation.start()
await BackgroundGeolocation.changePace(true)
await BackgroundGeolocation.setConfig({
debug:false
})
} else {
await BackgroundGeolocation.stop();
await BackgroundGeolocation.setConfig({
debug:true
})
}
})()
}
``
I hope it will help.
Tomorrow we try the new bggeolocation-demo-issue app.
preventSuspend: true,
Once again, do not use preventSuspend
. It does not work with WhenInUse
. preventSuspend
mode is engaged only when the device is in the stationary-state (changePace(false)
). The prevent-suspend system is not engaged while the plugin in the moving state (changePace(true)
).
Your use-case does not involve preventSuspend
since you are immediately calling changePace(true)
after .start()
.
The purpose of preventSuspend
is to allow an app running in the background with the plugin in the stationary state (ie: where location-services are off) to remain alive in the background while monitoring the Motion API for movement. When movement is detected, the plugin can automatically call changePace(true)
upon itself to automatically engage location tracking rather than waiting for the usual 200 meters of movement for the stationary geofence exit to fire.
I'm trying, but I think I've done it before:
const MacSettings = {
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_NAVIGATION,
// preventSuspend: true,
heartbeatInterval: 60,
stopTimeout: 60 * 10,
locationAuthorizationRequest: 'WhenInUse',
debug: false,
logLevel: BackgroundGeolocation.LOG_LEVEL_ERROR,
// transistorAuthorizationToken: token,
distanceFilter: 10,
isMoving: true,
pausesLocationUpdatesAutomatically: false,
disableStopDetection: true
}
I took my Capacitor demo app out today for a 40 min walk. No issues.
I took my Capacitor demo app out today for a 40 min walk. No issues.
did you change anything on the plugin side?
No. I gave it the identical Config as you did in your -demo GitHub repo.
Try this: put the app in the background with service off, leave it like that for a while until the system terminates it. When you bring it back to the foreground you see the splash (the app was not closed by me but by the system) and you start the service, after a few minutes it disconnects. Same thing when the app is put into suspended state (so no initial splash). Totally change from a departure from an app closed by me and from an app terminated or suspended from the system.
Summing up:
Can you try that with the counter example I posted?
During our lunch break, let's try your example in the field.
As a clue I can tell you (but we are not 100% sure, we would need a proof that we do pause) that the "debug" command somehow affects the plug-in. From some tests made previously with debug turned off the blue symbol disappeared after a while, with debug turned on (and subsequently turned off by code) it held.
Update: the walking tour gave a positive result, that is, it never showed the problems encountered with the other demo app. But the configuration here is different than in the app:
rn-background-geolocation-demo
BackgroundGeolocation.ready ({
debug: false,
stopTimeout: 60,
locationAuthorizationRequest: 'WhenInUse',
distanceFilter: 0,
pausesLocationUpdatesAutomatically: false,
disableStopDetection: true
}). then ((state) => {
BackgroundGeolocation.changePace (true);
/// Add the current state as first item in list.
addEvent ('Current state', state);
/// Set the default <Switch> state (disabled)
setEnabled (state.enabled);
});
const onClickEnable = (value: boolean) => {
(async () => {
setEnabled (value);
if (value) {
await BackgroundGeolocation.start ()
await BackgroundGeolocation.changePace (true)
} else {
await BackgroundGeolocation.stop ();
}
}) ()
}
bggeolocation-demo-issue-master
BackgroundGeolocation.ready ({
debug: false,
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
stopTimeout: 60,
locationAuthorizationRequest: 'WhenInUse',
distanceFilter: 0,
pausesLocationUpdatesAutomatically: false,
disableStopDetection: true
}). then ((state) => {
console.log ('- state:', state);
setEnabled (state.enabled);
setIsMoving (state.isMoving);
});
const onToggleEnabled = async () => {
const isEnabled =! enabled;
if (isEnabled) {
await BackgroundGeolocation.start ();
await BackgroundGeolocation.changePace (true);
setIsMoving (true);
} else {
BackgroundGeolocation.stop ();
setIsMoving (false);
}
setEnabled (isEnabled);
}
What does not occur is the suspension of the app from the system, and therefore we are unable to reproduce what remains the last obstacle to publish the app.
That is: if you restart the app from an app already open but previously put to sleep or terminated by the system, it does not work.
With this version (perhaps because it is very light) we have not been able to make the system put it in sleep or terminate it (obviously when it is not tracing).
Your Environment
react-native -v
): react-native-cli: 2.0.1 - react-native: 0.64.3Expected Behavior
It should track in the background with "When in use" privacy
Actual Behavior
After a certain period of time the application stops tracking
Steps to Reproduce
Context
Being able to create an iOS and Android application that tracks the activity of a person who walks, runs or rides a bicycle both on the road and on dirt roads.
In log file we found that activity tracking stops here: 02-02 14:41:42.583 DEBUG [AbstractService a] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true]
Here I resumed the app: 02-02 14:47:34.370 INFO [LoggerFacade$a a]
we lost tracking from 14:41 to 14:47.
Debug logs
Logs
``` ╔═════════════════════════════════════════════ ║ TSLocationManager version: 3.1.35 (391) ╠═════════════════════════════════════════════ ╟─ HUAWEI JSN-L21 @ 9 (react-native) { "activityRecognitionInterval": 10000, "allowIdenticalLocations": false, "authorization": {}, "autoSync": true, "autoSyncThreshold": 0, "backgroundPermissionRationale": { "title": "Allow {applicationName} to access this device's location even when closed or not in use?", "message": "[CHANGEME] This app collects location data for FEATURE X and FEATURE Y.", "positiveAction": "Change to \"{backgroundPermissionOptionLabel}\"", "negativeAction": "" }, "batchSync": false, "configUrl": "", "debug": false, "deferTime": 0, "desiredAccuracy": -2, "desiredOdometerAccuracy": 100, "disableAutoSyncOnCellular": false, "disableElasticity": false, "disableLocationAuthorizationAlert": false, "disableMotionActivityUpdates": false, "disableStopDetection": false, "distanceFilter": 10, "elasticityMultiplier": 1, "enableHeadless": true, "enableTimestampMeta": false, "extras": {}, "fastestLocationUpdateInterval": -1, "foregroundService": true, "geofenceInitialTriggerEntry": true, "geofenceModeHighAccuracy": false, "geofenceProximityRadius": 1000, "geofenceTemplate": "", "headers": {}, "headlessJobService": "com.transistorsoft.rnbackgroundgeolocation.HeadlessTask", "heartbeatInterval": -1, "httpRootProperty": "location", "httpTimeout": 60000, "isMoving": false, "locationAuthorizationRequest": "WhenInUse", "locationTemplate": "", "locationTimeout": 60, "locationUpdateInterval": 1000, "locationsOrderDirection": "ASC", "logLevel": 5, "logMaxDays": 3, "maxBatchSize": -1, "maxDaysToPersist": 1, "maxRecordsToPersist": -1, "method": "POST", "minimumActivityRecognitionConfidence": 75, "motionTriggerDelay": 0, "notification": { "layout": "", "title": "", "text": "Location Service activated", "color": "", "channelName": "TSLocationManager", "smallIcon": "", "largeIcon": "", "priority": 0, "sticky": false, "strings": {}, "actions": [] }, "params": {}, "persist": true, "persistMode": 2, "schedule": [], "scheduleUseAlarmManager": false, "speedJumpFilter": 300, "startOnBoot": false, "stationaryRadius": 25, "stopAfterElapsedMinutes": 0, "stopOnStationary": false, "stopOnTerminate": false, "stopTimeout": 5, "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking", "url": "", "useSignificantChangesOnly": false, "enabled": false, "schedulerEnabled": false, "trackingMode": 1, "odometer": 11808.599609375, "isFirstBoot": false, "didLaunchInBackground": false, "didDeviceReboot": false } ╔═════════════════════════════════════════════ ║ DEVICE SENSORS ╠═════════════════════════════════════════════ ╟─ ✅ ACCELEROMETER: {Sensor name="accelerometer-bmi160", vendor="BOSCH", version=1, type=1, maxRange=78.4532, resolution=9.576806E-6, power=0.23, minDelay=4000} ╟─ ✅ GYROSCOPE: {Sensor name="bosch-bmi160", vendor="BOSCH", version=1, type=4, maxRange=34.906586, resolution=1.7453292E-5, power=6.1, minDelay=4000} ╟─ ✅ MAGNETOMETER: {Sensor name="mag-akm09918", vendor="akm", version=1001, type=2, maxRange=2000.0, resolution=0.0625, power=6.8, minDelay=10000} ╟─ ✅ SIGNIFICANT_MOTION: {Sensor name="significant Motion", vendor="huawei", version=1, type=17, maxRange=2.14748365E9, resolution=1.0, power=0.23, minDelay=-1} ╚═════════════════════════════════════════════ ╔═════════════════════════════════════════════ ║ TrackingService: LocationResult ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 46******,9****** hAcc=26 et=+3d1h28m29s452ms alt=261.0 vel=0.60704195 bear=312.5772 vAcc=1 sAcc=??? bAcc=???], age: 108ms, time: 1643809295463 02-02 14:41:35.580 DEBUG [TSLocationManager onLocationResult] ╔═════════════════════════════════════════════ ║ Process LocationResult ╠═════════════════════════════════════════════ 02-02 14:41:35.582 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 8.946 02-02 14:41:35.584 DEBUG [TSLocationManager incrementOdometer] Odometer: 11340.667 02-02 14:41:35.586 DEBUG [AbstractService a] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true] 02-02 14:41:35.609 INFO [b persist] ✅ INSERT: 22397d68-6df4-437d-9cad-dcb52aa3f427 02-02 14:41:37.582 DEBUG [AbstractService a] 🎾 TrackingService [eventCount: 1] 02-02 14:41:37.585 DEBUG [TrackingService b] ╔═════════════════════════════════════════════ ║ TrackingService: LocationResult ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 46******,9****** hAcc=30 et=+3d1h28m31s490ms alt=261.0 vel=0.85510886 bear=317.46118 vAcc=1 sAcc=??? bAcc=???], age: 81ms, time: 1643809298000 02-02 14:41:37.587 DEBUG [TSLocationManager onLocationResult] ╔═════════════════════════════════════════════ ║ Process LocationResult ╠═════════════════════════════════════════════ 02-02 14:41:37.588 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 9.159 02-02 14:41:37.591 DEBUG [AbstractService a] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true] 02-02 14:41:37.597 INFO [b persist] ✅ INSERT: 24fbbe45-5946-42d5-8ddb-b7d8570cc698 02-02 14:41:38.848 DEBUG [AbstractService a] 🎾 TrackingService [eventCount: 1] 02-02 14:41:38.852 DEBUG [TrackingService b] ╔═════════════════════════════════════════════ ║ TrackingService: LocationResult ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 46******,9****** hAcc=23 et=+3d1h28m32s766ms alt=261.0 vel=0.94061583 bear=328.5504 vAcc=1 sAcc=??? bAcc=???], age: 73ms, time: 1643809298777 02-02 14:41:38.857 DEBUG [AbstractService a] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true] 02-02 14:41:38.857 DEBUG [TSLocationManager onLocationResult] ╔═════════════════════════════════════════════ ║ Process LocationResult ╠═════════════════════════════════════════════ 02-02 14:41:38.858 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 9.319 02-02 14:41:38.859 DEBUG [TSLocationManager incrementOdometer] Odometer: 11374.249 02-02 14:41:38.900 INFO [b persist] ✅ INSERT: 258158e7-aa0a-45c7-97b8-12ba94fd6021 02-02 14:41:39.997 DEBUG [AbstractService a] 🎾 TrackingService [eventCount: 1] 02-02 14:41:40.003 DEBUG [TrackingService b] ╔═════════════════════════════════════════════ ║ TrackingService: LocationResult ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 46******,9****** hAcc=18 et=+3d1h28m33s908ms alt=261.0 vel=1.0325823 bear=337.04288 vAcc=1 sAcc=??? bAcc=???], age: 82ms, time: 1643809299920 02-02 14:41:40.007 DEBUG [TSLocationManager onLocationResult] ╔═════════════════════════════════════════════ ║ Process LocationResult ╠═════════════════════════════════════════════ 02-02 14:41:40.008 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 9.062 02-02 14:41:40.015 DEBUG [AbstractService a] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true] 02-02 14:41:40.023 INFO [b persist] ✅ INSERT: 8a1604c0-b988-48d1-86cf-ef9436fca905 02-02 14:41:42.570 DEBUG [AbstractService a] 🎾 TrackingService [eventCount: 1] 02-02 14:41:42.578 DEBUG [TrackingService b] ╔═════════════════════════════════════════════ ║ TrackingService: LocationResult ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 46******,9****** hAcc=14 et=+3d1h28m36s477ms alt=261.0 vel=1.1349927 bear=343.4294 vAcc=1 sAcc=??? bAcc=???], age: 83ms, time: 1643809303000 02-02 14:41:42.583 DEBUG [AbstractService a] ⚙️︎ finish TrackingService [eventCount: 0, sticky: true] 02-02 14:41:42.583 DEBUG [TSLocationManager onLocationResult] ╔═════════════════════════════════════════════ ║ Process LocationResult ╠═════════════════════════════════════════════ 02-02 14:41:42.589 DEBUG [TSLocationManager calculateMedianAccuracy] Median accuracy: 9.749 02-02 14:41:42.593 DEBUG [TSLocationManager incrementOdometer] Odometer: 11400.761 02-02 14:41:42.625 INFO [b persist] ✅ INSERT: e9772b4f-bdc9-49bb-9ba0-e72bb8e623c4 02-02 14:47:34.370 INFO [LoggerFacade$a a] ╔═════════════════════════════════════════════ ║ TSLocationManager version: 3.1.35 (391) ╠═════════════════════════════════════════════ ╟─ HUAWEI JSN-L21 @ 9 (react-native) { "activityRecognitionInterval": 10000, "allowIdenticalLocations": false, "authorization": {}, "autoSync": true, "autoSyncThreshold": 0, "backgroundPermissionRationale": { "title": "Allow {applicationName} to access this device's location even when closed or not in use?", "message": "[CHANGEME] This app collects location data for FEATURE X and FEATURE Y.", "positiveAction": "Change to \"{backgroundPermissionOptionLabel}\"", "negativeAction": "" }, "batchSync": false, "configUrl": "", "debug": false, "deferTime": 0, "desiredAccuracy": -2, "desiredOdometerAccuracy": 100, "disableAutoSyncOnCellular": false, "disableElasticity": false, "disableLocationAuthorizationAlert": false, "disableMotionActivityUpdates": false, "disableStopDetection": false, "distanceFilter": 10, "elasticityMultiplier": 1, "enableHeadless": true, "enableTimestampMeta": false, "extras": {}, "fastestLocationUpdateInterval": -1, "foregroundService": true, "geofenceInitialTriggerEntry": true, "geofenceModeHighAccuracy": false, "geofenceProximityRadius": 1000, "geofenceTemplate": "", "headers": {}, "headlessJobService": "com.transistorsoft.rnbackgroundgeolocation.HeadlessTask", "heartbeatInterval": -1, "httpRootProperty": "location", "httpTimeout": 60000, "isMoving": true, "locationAuthorizationRequest": "WhenInUse", "locationTemplate": "", "locationTimeout": 60, "locationUpdateInterval": 1000, "locationsOrderDirection": "ASC", "logLevel": 5, "logMaxDays": 3, "maxBatchSize": -1, "maxDaysToPersist": 1, "maxRecordsToPersist": -1, "method": "POST", "minimumActivityRecognitionConfidence": 75, "motionTriggerDelay": 0, "notification": { "layout": "", "title": "", "text": "Location Service activated", "color": "", "channelName": "TSLocationManager", "smallIcon": "", "largeIcon": "", "priority": 0, "sticky": false, "strings": {}, "actions": [] }, "params": {}, "persist": true, "persistMode": 2, "schedule": [], "scheduleUseAlarmManager": false, "speedJumpFilter": 300, "startOnBoot": false, "stationaryRadius": 25, "stopAfterElapsedMinutes": 0, "stopOnStationary": false, "stopOnTerminate": false, "stopTimeout": 5, "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking", "url": "", "useSignificantChangesOnly": false, "enabled": true, "schedulerEnabled": false, "trackingMode": 1, "odometer": 11400.7607421875, "isFirstBoot": false, "didLaunchInBackground": false, "didDeviceReboot": false } 02-02 14:47:34.374 INFO [TSConfig print] ╔═════════════════════════════════════════════ ║ DEVICE SENSORS ╠═════════════════════════════════════════════ ╟─ ✅ ACCELEROMETER: {Sensor name="accelerometer-bmi160", vendor="BOSCH", version=1, type=1, maxRange=78.4532, resolution=9.576806E-6, power=0.23, minDelay=4000} ╟─ ✅ GYROSCOPE: {Sensor name="bosch-bmi160", vendor="BOSCH", version=1, type=4, maxRange=34.906586, resolution=1.7453292E-5, power=6.1, minDelay=4000} ╟─ ✅ MAGNETOMETER: {Sensor name="mag-akm09918", vendor="akm", version=1001, type=2, maxRange=2000.0, resolution=0.0625, power=6.8, minDelay=10000} ╟─ ✅ SIGNIFICANT_MOTION: {Sensor name="significant Motion", vendor="huawei", version=1, type=17, maxRange=2.14748365E9, resolution=1.0, power=0.23, minDelay=-1} ╚═════════════════════════════════════════════ 02-02 14:47:34.382 INFO [BackgroundGeolocation