android icon indicating copy to clipboard operation
android copied to clipboard

Can't seem to get significant movement mode to work

Open Outlet2048 opened this issue 3 years ago • 6 comments

I habe always used the move monitoring mode to get the highest accuracy but decided to try out signicant movements mode to save some battery life

On my old phone I noticed that this would seriously mess up my GPS on all apps for some reason until I restarted my phone

On my new phone this is no longer the case But one issue remains

It just doesn't work I went on a run over 4.5 km today and went quite far from home and during the entirety of the run it stored 2 location updates (I used a fitness tracker app during that run and can confirm that my GPS accuracy wasn't an issue. The run was tracked perfectly fine using another app)

And the same happened on my old phone

Whenever I use signicant movement mode it just doesn't seem to detect significant movements at all

So far only move monitoring mode worlds but that obviously takes a bit out of my battery life

What can I do to get the more battery friendly mode to work?

Oneplus 9 pro Android 11 Latest software on server and phone

Outlet2048 avatar Feb 13 '22 20:02 Outlet2048

I don't have a oneplus device, so it's difficult to try and work out what's going on here. I know that this works just fine on other devices, so I assume it must be something to do with your specific config, device configuration, or event make/model that means that location updates are not getting delivered to OT.

Can you post your config (with hostnames / passwords redacted), any logs (debug if you can), and also indicate what battery saving / optimizing modes you have available and are using.

If you want to do some testing, fiddling around with locatorDisplacement (try setting that to 0) and locatorInterval (try setting that to, say 60s). and seeing how that changes things. On my pixel 4a with those settings and the screen off, but battery whitelisted, I get a location background service location roughly every 60s (it varies, sometimes it's a bit longer). Look for D/BackgroundService/onLocationResult/178: location result received in the logs.

growse avatar Feb 15 '22 15:02 growse

My wife recently got a S20 FE with Android 12. Significant movement mode does not work there as well.

I noticed that i could not select the "Always" permission for locations, while other apps do have that option. The highest selectable permission is "Only when app is open". Maybe that is a hint? The silent notification with the current location is on and seems to never change. Only when the app is open.

I try to get config and logs and post them later.

Draghtnod avatar Feb 18 '22 16:02 Draghtnod

The "always" permission for location refers to background location, which isn't relevant to OT because we keep a foreground service running.

There's an outside chance that Samsung/OnePlus etc. have implemented this wrong (i.e. they won't give locations to a foreground service without background permission), but that would be very surprising.

growse avatar Feb 18 '22 19:02 growse

I found something interesting. The location messages are sent regularly, no issue there. I have logged them on the server. But the location that is sent is not the actual location of the phone. It is an exact same old location over and over again. The correct location seems to be updated when the app is opened. Maybe when the phone is used in some other way as well, I'm not sure about that yet, but just unlocking seems not sufficient.

owntracks-log.txt config.otrc.txt

Draghtnod avatar Feb 19 '22 09:02 Draghtnod

This is... Weird.

Can you try to see if you get accurate locations after you unlock the device and open another app (not OT) that requests a high accuracy location (e.g. Google maps)?

growse avatar Feb 19 '22 13:02 growse

I had the same issue on both Gigaset GS4 of my wife and me for the last few months. Today heating season beguns and I investigated a bit further and noticed in advance settings the settings for Ignore inaccurate positions. I have seen this was set to zero and changed this to 500 (just a random number) on both devices and significant mode seems to work now on both of them. Will check this the next days and report here again.

DerOetzi avatar Sep 18 '22 20:09 DerOetzi