Inconsistent location reporting when android devices are idle for extended period. Logs provided

Antony last month

When the Android screen stays off for an extended period while Traccar Client runs in the background, location updates become infrequent and inconsistent while in moving state.

Expected behavior

White in moving state, Traccar Client receives a fresh GPS fix roughly once per second (visible in the logs as “location filtered” entries), regardless of whether the screen is on or off. Positions are uploaded according to the configured distance and interval, and speed and heading are reported correctly.

Actual behavior

After the device has been idle (screen off, not unlocked) for a while, the interval between received GPS fixes becomes irregular, sometimes reaching about 30 seconds. That is for the "Location filtered" entries in the logs.
Because of the gaps. The distance between consecutive reported positions can far exceed the configured distance.
Whenever a fresh location is not received on the ~1 second cadence, the reported speed is always 0 and the heading is not reported in the uplaoded data sent to the server.
The GPS stays active the whole time. The problem is that Traccar receives fresh coordinates less frequently, not that GPS is off.
Once the screen is turned on or the device is unlocked, the ~1 second cadence returns.

Impact

  1. Less accurate location tracking.
  2. Speed is reported as 0 and heading is missing during the affected periods.

Steps to reproduce

Start Traccar Client with distance: 300 m, interval: 30 s, accuracy setting: Highest .
Confirm in the logs that location updates arrive about once per second.
Leave the device while traccar is in moving state with the screen off and the device locked, without interacting with it.
After an hour or so, check the logs. The “location filtered” entries become irregular, with gaps of up to ~30 seconds.

Environment

Settings: battery optimization disabled, phone power saving mode off, no background restrictions for traccar
Traccar configurations:
Location accuracy: Highest
Distance: 300
Interval: 30
Angle: 30
Stationary heartbeat: 30
Offline buffering: Off
Wake locak: On
Stop detection: On
use system location: Off

Reproduced on multiple devices and ROMs:
Samsung Galaxy S26 Ultra
Nokia 3.4
Samsung Galaxy A17
Xiaomi Redmi Note 8 Pro
Xiaomi Redmi Note 4

Attached Logs

Attached is a log from a user traveling on a train. Up to the entry "2026-10-19 14:09:52 Location filtered", location filtered updates arrive about once per second. From that line onward, the intervals between “location filtered” entries become irregular, and the distance between reported positions often exceeds the configured distance with the previously mentioned issues arrising.

Logs link
https://wormhole.app/l8oo34#s4CR_e8NglQo5B06wJaVSQ

Anton Tananaev last month

My hypothesis is that after the screen has been off for a while, the fused location provider stops receiving reliable GPS fixes and relies more on network-based locations, such as cell towers or Wi-Fi. That would explain the slower updates, repeated coordinates followed by large jumps, and missing speed and heading. Turning the screen on may restore normal GPS delivery, possibly because of power management, but the logs alone can’t confirm this.

Try enabling “Use system location” while keeping accuracy at “Highest” and repeat the test. This requests locations directly from the GPS provider and should help determine whether the issue is specific to the fused provider.

Antony last month

Will do, however I am not traveling or going for a long ride within the upcoming couple of weeks in order to test this hypothesis. Will test it and report back as soon as I can. Thanks.

Antony 11 days ago

I have noticed something that might actually help metigate this issue. No matter how long a device has been idle with screen off for. When it first switches over to moving state after being stationary, it always sends the updates regularly and the location filtered log entry appears once per second in the logs. It is only an issue when the device remains in moving state for an extended period of time with the screen off.

So do you think that by periodically - once let's say every 20 minutes- while in moving state to manually retrigger going into moving mode to reset the behavior leading to this issue and regaining access to the location coordinates once per second agan? Can we please maybe consider experimenting with this approach if you think it can help?

Anton Tananaev 11 days ago

Are you sure you have all permissions enabled? Including notifications?

Antony 11 days ago

Yes. 100%.

Antony 11 days ago

Happens consistently on every android device. Only with fused location

Anton Tananaev 11 days ago

I'm not sure what you mean exactly by re-triggering moving mode. That's something system does, not the app.

Antony 11 days ago

Well in that case, that can't be a possible workaround sadly.

Anton Tananaev 11 days ago

I think you need to check logs to understand what's really happening.

Antony 11 days ago

This is a system limitation not a bug, however maybe a workaround can resolve it. I though also about using same api an alarm clock uses to periodically turn screen on briefly for a second once every 20 minutes or so.

Antony 9 days ago

Another possible workaround, maybe in advanced settings, add a new option to allow the use of system location while in moving state only and switch over to fused when stationary since system location doesn't suffer from the same issue outlined above.

Or ideally allow traccar to update the configurations based on the http response it gets from server when sending a location update. For example, if the server responds with http code 200 don't do anything just like it is now, otherwise if server responds with http code 201, traccar parses the reponse which is a new configuration json and auto applies it, this alllows the server to dynamically update traccar parameters including the use system Location option