Traccar Client v3.8 on Android 4.4.4 locks GPS on

Hubsim8 years ago

I am using Traccar client v3.8 on Android 4.4.4 with a frequency of 900s and mixed provider for location. When I have the service turned on, my battery drains very quickly and a look at the battery monitor indicates that GPS is running constantly instead of cycling off. Any idea how to troubleshoot this?

Hubsim8 years ago

This also occurs when location provider is set to GPS and is resolved when set to network.

Anton Tananaev8 years ago

Most likely it means that your phone can't get a GPS fix and therefore constantly keeping it on trying to get a fix.

Hubsim8 years ago

In this situation that is not the issue. This problem occurs 100% of the time and I just tested and was able to get a GPS fix immediately despite being inside. The battery stats show GPS is always on, not just on for long periods of time (like it would possibly be if GPS fix was hard to acquire) and then off. Also, if it were set to mixed provider shouldn't it cycle the GPS off and switch to network if it can't acquire a signal?

Anton Tananaev8 years ago

How do you know you get a GPS fix immediately? GPS doesn't work indoors.

Hubsim8 years ago

I tested with GPS Status & Toolbox. Also, GPS can work indoors, it depends on the structure and RF dampening. In my case the only thing separating me from the sky is some wood which isn't a significant hindrance for ~1 Ghz RF.

Just tested again, time to GPS fix indoors was 3 seconds.

Anton Tananaev8 years ago

Traccar Client just requests GPS location from Android with selected interval. It doesn't manage GPS module, so it must be some issue on OS level.

As for mixed provider, it still wait for GPS all the time because how else would you switch back to GPS?

Hubsim8 years ago

Okay thanks. If I figure out how to fix it I'll post.

karatasi8 years ago

Hello,

in case user will switch off the GPS location module - is it possible Traccar would switch it on to get the location and then switch it off again?

Tnx
K.

Anton Tananaev8 years ago

No, if user disabled GPS, there is no way to access it from the app.

karatasi8 years ago

So it's technically not possible to change the app the way it would ask for permission to access the GPS when installing the app? So later the app would be able to switch it on / off.

Tnx
K.

Anton Tananaev8 years ago

No, it not possible. There is only one GPS permission in Android which allows you to use GPS if it's enabled. If GPS is disabled, no app on the phone can use it. That's the whole point of disabling it.