I don't see any post requests in the log. It should show something. But if you don't see any location updates, it means the device is not reporting anything. It must be some settings or permissions issue on your phone.
There are post requests in the logs and as mentioned the http posts happens at the internal time set in app. I just truncated it as the distance between none of the updates ever exceeds 0.1 meters
Can you please include non-truncated logs. And also your configuration.
Will do in a bit. Have to create a script that will mask gps coordinates before posting them. will still use harvestine equation to keep tracks of distance between coordinates in logs and post it as I think you will be looking for distance moved in logs
You can probably just mask first digits or something.
Here are the logs
Traccar configured as follows
Accuracy: Highest
Distance: 300
Interval: 30
Angle: Disabled
Stationary heartbeat: 900
Offline buffering: off
Wake lock: on
Stop detection: on
Use system location: off
Note that all distances in the logs are in meters
logs file
It seems like everything is working correctly. What is the issue exactly?
The GPS remains continuously active as though the device is in a moving state, even though it was completely stationary for the entire duration of the captured logs. In fact, the device remained stationary on a desk for more than 12 hours. I had to clear the logs and restart the device because the log file became too large for the device to copy.
When a device has been stationary for an extended period, it should disable GPS, transition into stationary mode, ignore the moving update interval, and use the stationary heartbeat interval instead. This is the expected behavior and is how most of my devices operate. However, a couple of devices—including the one these logs were collected from—do not exhibit this behavior and instead keep the GPS active indefinitely as if they are continuously moving.
Isn't this a bug ?
I wish you would include the reason why traccar decided to switch to moving state in the logs to pin point why isn't stop detection working as it should. I think it is hard for you to locate the bug without having the logs showing the reason.
Seems like Google Service is not reporting transitions. Are you sure the device has official Google Services and both the app and Google Services have all permissions?
I would also recommend moving and then stopping. Just to see if it triggers transitions.
Yes 100% play services is there and old traccar was working fine on this device. Double checked permissions and all are granted just fine.
Also tried with "use system location" turned on and it is no different. same bug persists even with this toggled on
I will try to take this phone out with me to check if it triggers transitions when actually moving and report later on
Upon taking one of the affected devices on a walk/ bicycle ride. The app correctly recognized that the device was moving. After I stopped and remained stationary for a short time, Traccar logged "Activity transition still enter" and switched back to stationary mode as expected. At that point, GPS was no longer stuck on, and Traccar resumed normal behavior.
This confirms that the issue is not caused by Google Play Services failing to report activity transitions or by the device itself, since motion detection and the transition back to stationary mode (stop detection) both work correctly.
However, I noticed a consistent pattern that may help identify the root cause:
As soon as Continuous Tracking is enabled again, the bug immediately reappears: the app behaves as if the device is moving, GPS remains continuously active, and it never recognizes that the device is in stationary state untill you actually move and become stationary again.
This behavior suggests that the problem is related to the initialization logic when Continuous Tracking is enabled, rather than activity recognition itself.
My suspicion is that when Continuous Tracking is turned on, Traccar initializes the device in a moving state without first verifying whether the device is actually stationary. It then appears to wait indefinitely for Android to report an activity transition before updating its state. If the device is already stationary when Continuous Tracking is enabled, no transition event is generated, so Traccar remains stuck in the moving state and keeps GPS active until the device physically moves and Android reports a new activity transition.
Version 10.0.1 should fix the problem.
Most of my test devices aren't encountering this bug but some do. All of which are android. Device is totally stationary and ever since I tried v10.0.0 on it on highest accuracy, GPS has constantly remained on despite not moving a centimeter. Logs don't show any activity recognized. I uninstalled app multiple times on these devices and reinstalled but with no luck. Is there any way you can include in the logs the reason for traccar being in moving mode to identify where is the bug coming from? Worth mentioning as well that I toggled the "use device location" on these devices thinking it might be a play services bug, however that made no difference.
Logs show
Then it just kept sending http post requests at the interval time. .
Side question as well. Have you considered including the last known coordinates in the heartbeat request since it is going to help in scenarios mentioned here
https://github.com/traccar/traccar-client/issues/197