Closed Rutvik-tbz closed 4 weeks ago
All those π΄ messages at the end show you are calling .stop()
.
@christocracy After starting the service, I do not stop it with (BackgroundGeolocation.start()) is there any configuration change (BackgroundGeolocation.ready()) ??
is there any configuration change (BackgroundGeolocation.ready()) ??
No.
Itβs right there: youβre telling the plug-in to .stop(). Check your code. Either that or the Config youβre actually using is not the same as that posted to this issue.
2024-09-09 17:55:09.696
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager stop]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
@christocracy, we have the same configuration that we shared. In our application, I removed the code for stopping the location service and then took logs.
after starting service I am not stopping it. but still, the library stop giving updated locations, in the log we can see that
2024-09-10 16:11:48.447 β οΈ-[BackgroundTaskManager createBackgroundTask]_block_invoke FORCE KILL BACKGROUND TASK: 7, remaining time: 4.000219
2024-09-10 16:11:48.447 β
-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 7 OF (
7
)
After this line, the library stops providing updates. After I manually open the application, it starts.
See full logs
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager start]
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-09-10 16:11:36.305 βΉοΈ-[TSLocationManager doStart:] trackingMode: 1
2024-09-10 16:11:36.305 βΉοΈ-[TSConfig persist]
2024-09-10 16:11:36.311 πΎ-[TSGeofenceManager start]
2024-09-10 16:11:36.313 πΎ-[SOMotionDetector startDetection]
2024-09-10 16:11:36.314 π΅-[TSLocationManager setPace:] 0
2024-09-10 16:11:36.328 πΎ-[TSLocationManager startUpdatingLocation] Location-services: ON
2024-09-10 16:11:36.356 β
-[SOMotionDetector startDetection]_block_invoke Enabled M7 MotionActivity updates
2024-09-10 16:11:36.366
π<+23.01933246,+72.51922460> +/- 35.00m (speed -1.00 mps / course -1.00) @ 10/09/24, 16:11:16 India Standard Time
2024-09-10 16:11:36.366
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 19958 ms
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-09-10 16:11:36.366 βΉοΈ-[TSLocationManager locationManager:didUpdateLocations:] Received stale motionchange location. Retrying...
2024-09-10 16:11:36.366
π<+23.01933246,+72.51922460> +/- 35.00m (speed -1.00 mps / course -1.00) @ 10/09/24, 16:11:36 India Standard Time
2024-09-10 16:11:36.366
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 26 ms
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-09-10 16:11:36.366 β
-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+23.01933246,+72.51922460> +/- 35.00m (speed -1.00 mps / course -1.00) @ 10/09/24, 16:11:36 India Standard Time
2024-09-10 16:11:36.368 π΅-[TSLocationManager startMonitoringStationaryRegion:radius:] Radius: 200
2024-09-10 16:11:36.368 π΅-[TSLocationManager beginHeartbeat] 60
2024-09-10 16:11:36.368 π΄-[TSLocationManager stopUpdatingLocation]
2024-09-10 16:11:36.368 π΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 35.0
2024-09-10 16:11:36.368 βΉοΈ-[PolygonGeofencingService setLocation:] Already updating location <IGNORED>
2024-09-10 16:11:36.388 πΎ-[TSLocationManager startMonitoringSignificantLocationChanges]
2024-09-10 16:11:36.390 β
-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS
2024-09-10 16:11:36.394 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-09-10 16:11:36.394 πΎ-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON
2024-09-10 16:11:36.403 β
-[TSLocationManager persistLocation:]_block_invoke INSERT: A8509C08-6213-4B0A-832D-9FC6DF6C14D1
2024-09-10 16:11:36.417 β
-[BackgroundTaskManager createBackgroundTask] 7
2024-09-10 16:11:36.432 βΉοΈ-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke Configured BackgroundFetch
2024-09-10 16:11:36.432
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
2024-09-10 16:11:39.522 π΅-[BackgroundTaskManager onPreventSuspendTimer:] Prevent-suspend timer fired! (bg time remaining: 12.924749)
2024-09-10 16:11:39.558 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-09-10 16:11:42.565 π΅-[BackgroundTaskManager onPreventSuspendTimer:] Prevent-suspend timer fired! (bg time remaining: 9.882543)
2024-09-10 16:11:42.602 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-09-10 16:11:45.607 π΅-[BackgroundTaskManager onPreventSuspendTimer:] Prevent-suspend timer fired! (bg time remaining: 6.840572)
2024-09-10 16:11:45.648 βΉοΈ+[LocationAuthorization run:onCancel:] status: 3
2024-09-10 16:11:48.447 β οΈ-[BackgroundTaskManager createBackgroundTask]_block_invoke FORCE KILL BACKGROUND TASK: 7, remaining time: 4.000219
2024-09-10 16:11:48.447 β
-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 7 OF (
7
)
2024-09-10 16:15:06.001 π΅-[TSLocationManager onHeartbeat] Heartbeat
2024-09-10 16:15:06.004 π΅-[TSLocationManager onResume:] enabled? 1
2024-09-10 16:15:06.007 βΉοΈ-[LocationDAO purge:] 1
2024-09-10 16:15:06.020 βΉοΈ-[TSDBLogger db_save] Log committed
2024-09-10 16:15:06.022 βΉοΈ-[TSDBLogger db_save] Log committed
2024-09-10 16:15:06.039
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
How are you testing this? Sitting at your desk?
go outside and move for >= 1km. The plug-in tracks when you move and stops tracking when youβre stationary.
@christocracy Yes, Sitting at my desk, it will start if I go for a walk
but in stationary mode, It only provides 2-3 locations and then stops. Can I keep the service running in stationary mode for some time in iOS kill mode?
Iβd you want periodic locations while stationary, implement background-fetch (already included as a dependency). Call .getCurrentPosition in your fetch callback.
disable preventSuspend: true. It doesnβt work anymore.
Can I keep the service running in stationary mode for some time in iOS kill mode?
no. You must move at least 200 meters before iOS will relaunch a terminated app.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
I want to get a location in kill mode (iOS) My application is already in a kill state, I activate location services (BackgroundGeolocation.start()) using silent notifications. The location service activates successfully and provides 2-3 locations, but then it stops giving updates after that, my mobile is in still mode (on my desk) how can I start it in still mode for some time
If I walk, then it starts successfully.
Your Environment
react-native -v
): 0.74.1Plugin config
Steps to Reproduce
My .emailLog