-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Background location (notification and maybe location requests) seems to happen when not expected #6011
Comments
Just reconfigured for internal GNSS vs bluetooth that's powered off :-) Looks like with opening a project with tracking and hitting home, positioning continues to run. And just on opening QFIeld, no project, it's requesting location. |
@gdt , thanks for the feedback. Let me try to explain in more details how positioning behaves in QField. First, when you open QField and positioning was activate during your last session, QField will enable positioning on launch. The expectation here is that users who turned positioning on will want it on next time they return to QField. The other advantage of activating positioning on launch is that for GNSS internal/external devices requiring a bit of time to get a fix, the sooner we launch it, the sooner the user gets a reading. If we'd wait 2-5 second for a user to open a project, it's potentially 2-5 seconds we could have used to get a fix. The positioning service on Android is actually a foreground service. We rely on it to provide positioning while QField is open and people are browsing their projects as well as when the app is suspended / put in background. One thing that was not made clear until now is that when we turn off positioning in QField (via long-press on top of the positioning button and unchecking [x] positioning enabled), we didn't reflect that in the notification. That's fixed here: #6070 With that said, let me know if you have lingering questions / observations. If there is a feature request that lingers after these explanations (e.g. turn off positioning when app suspended / phone locked when not tracking), we can turn this issue into an enhancement request. |
I see what you are trying to do, but as I see it privacy norms in open source are more important than shaving a few seconds. And, there are battery usage issues. In my case, I haven't set up a server so I am doing import/export via nextcloud, the now-amusingly-named "cable" option. So it's not all that odd for me to open up and want to manipulate files without opening a project. Hard to know others expectations, but I wouldn't have been surprised to see location used when opening a project. It's really "I've started the app, which could do multiple things, some of which need location, but I have not asked it to do any of those yet". (I am surprised you aren't having trouble with google play approvals.) It might be helpful to look at how Vespucci does this. My memory is that there's only a notification when positioning is obtained in the background, not when the app is in the foreground and it using location is not news. I am not up to date with Vespucci and will try to have a look. |
@gdt , it seems what you are looking for here is an option for QField to start with its positioning always turned off, even when you left it on in your last session (i.e. when you actually have asked it to do something 😉 that's being remembered by QField). That's an enhancement you could add to QField's idea platform here (https://ideas.qfield.org/), the upvotes on it would give all of us a good idea of whether many people are looking for such a functionality. |
That might be nice to have that sort of disabling but what I think I am asking for is for QField not to ask the OS for position until I as the user do something where I would expect position to be requested. I am actually ok with position being obtained for display when I open a project, because I expect to see the project's rendered map, and my position on it. (I don't expect it to be recorded, and I don't expect it to be sent anywhere :-) (The behavior of the auto tracking layer is probably another issue, but that's out of scope in this issue.) |
I updated to 3.5.0 (apk from github) for Android. On opening QField, I see a "positioning service" notification. I find this confusing for two reasons:
I pushed the "go home (square)" to get back to the home screen. The notification is still there. In this state, not having opened a project, and background, QField should not be asking for location or doing much of anything at all. Android doctrine seems not to distinguish much between back button and home button; the app is not on the screen and is not expected to do much, unless configured explicitly to do so.
My main project does have a tracking layer, as I was experimenting with that. But even if I load the project, I don't really expect background tracking and background battery use. I'd expect that background tracking is something I'd have to opt into from settings or a wizard, and that if this is in the Play store the rules would require that, from having watched e.g. Vespucci struggle with play store approvals: Even when the user had asked for recording position in background, their was angst about specific language.
(I'm not suggesting QField is doing anything devious; I view these as UI issues and also a battery issue of not running the GNSS receiver unless asked for.)
The text was updated successfully, but these errors were encountered: