I have noticed since the 9.5.0 update that on the highest accuracy once traccar goes into moving state it never reverts back to stationary state anymore even after being totally still and stationary for more than 30 minutes which leads to the gps ending up being always in use draining the battery. V9.4.3 used to switch the gps on when motion is detected and switches off the gps after being stationary for about 10 minutes.
Note that is obviously on.
This doesn't affect all devices I have but it affects enough devices to be considered a bug I think.
The device logs are shared from is an Android device running a pure version of stock Android 12 without root access or any modifications
steps I have done to try and understand what is happening.
Tried it with stop detection turned on and attempted to clear the app from RAM thinking it might be an issue if the app gets cleared from RAM while it was in moving state vs when it is in RAM, but it made no difference leading to traccar remaining in moving state after the actual movement by more than 50 minutes until I had to switch off continuous tracking off and on again to force traccar to refresh and turn off the GPS otherwise it would have ended up draing all battery.
Tried to see what happens with stop detection off and that is when I noticed an unexpected behavior as well which is on the highest accuracy with stop detection turned off, traccar should always be in moving state aka the continuous movement should always be green or switch to green even if the device was stationary at the time stop detection was turned off in addition to the GPS to be used, but it didn't end up neither turning the continuous tracking toggle green nor used the GPS, which I think is related to the original bug since both are unexpected behaviors for stop detection.
As per your request and I am sure it will be helpful, I will attach the logs (obviously with location info retracted). step taken before capturing the logs
0. Stopped continuous tracking
- cleared the logs
- Turned on stop detection
- turned on the continuous tracking
- Gave it some time for the GPS to be toggled off since I am currently stationary (the continuous tracking toggle became red)
- Turned off stop detection around 12:28 AM (continuous tracking's toggle remained red)
- Gave it some time to hopefully get traccar to switch to moving state, but it didn't
- Turned off continuous tracking around 12:30 AM
- turned continuous tracking back on again but still the toggle remained red despite stop detection being off (GPS was toggled on for about 3 seconds before being turned off again, I suppose it shouldn't have been turned off)
- shared the logs around 12:31 AM
What if you keep the tracking on and change configuration? Does it turn green?
What device are you using? What do you mean by stock Android exactly?
That specific device I shared the logs from is Nokia 3.4. When I say stock android I mean when a manufacturer uses Android without modifying it (remember google nexus ?)
So you mean original firmware that comes with the device?
Yes. Plus the original firmware is based on AOSP Android just like the one that came on google nexus devices back in the day before google pixels. Some manufacturers mod their Android version in a way that is too aggressive (like xiaomi for example) leading to an array of bugs with 3rd party applications
I see this in your log, which indicates that the state changed to motion:
07-13 00:20:00.019 INFO [TrackingService changePace]
setPace: true → true
Yes that is in step 4. The app goes into motion state normally upon opening it when being cleared from ram or starting continuous tracking with stop detection toggled on as in the case in step 4 mentioned
That's at the very end of the log.
It turned green in step 3 and 4 but starting from 5 (end of 4) it became red and never turned green again until sharing logs
The logs are in reverse chronological order, where the most recent log entry is on top. I didn't change the order btw. It is just how traccar logged the info.
I am starting to get 429 http code (too many requests) when replying. Which I am sure you have in place to avoid spam but in our case it just limits our genuine replies if its rate exceeds your predefined one. If you need a response from me and I am unable to post it here, you can get in touch with me on signal if you wish via [redacted]
Otherwise it might take a while for me to be able to respond without getting "too many requests" response
I have noticed since the 9.5.0 update that on the highest accuracy once traccar goes into moving state it never reverts back to stationary state anymore even after being totally still and stationary for more than 30 minutes which leads to the gps ending up being always in use draining the battery. V9.4.3 used to switch the gps on when motion is detected and switches off the gps after being stationary for about 10 minutes.
Note that is obviously on.
This doesn't affect all devices I have but it affects enough devices to be considered a bug I think.
The device logs are shared from is an Android device running a pure version of stock Android 12 without root access or any modifications
steps I have done to try and understand what is happening.
Tried it with stop detection turned on and attempted to clear the app from RAM thinking it might be an issue if the app gets cleared from RAM while it was in moving state vs when it is in RAM, but it made no difference leading to traccar remaining in moving state after the actual movement by more than 50 minutes until I had to switch off continuous tracking off and on again to force traccar to refresh and turn off the GPS otherwise it would have ended up draing all battery.
Tried to see what happens with stop detection off and that is when I noticed an unexpected behavior as well which is on the highest accuracy with stop detection turned off, traccar should always be in moving state aka the continuous movement should always be green or switch to green even if the device was stationary at the time stop detection was turned off in addition to the GPS to be used, but it didn't end up neither turning the continuous tracking toggle green nor used the GPS, which I think is related to the original bug since both are unexpected behaviors for stop detection.
As per your request and I am sure it will be helpful, I will attach the logs (obviously with location info retracted). step taken before capturing the logs
0. Stopped continuous tracking