opengisch / QField

A simplified touch optimized interface for QGIS
http://www.qfield.org
GNU General Public License v2.0
830 stars 226 forks source link

Add optional background location tracking with saving to layer, in the background and including on QField / Phone restart #5742

Open werererer opened 1 week ago

werererer commented 1 week ago

Description:

It would be very beneficial to have an optional setting in QField that enables continuous location tracking, even when the app is running in the background, after a phone restart, or after QField is restarted. This location data would be automatically saved to a layer for later analysis.

Use case:

I want to track my position throughout the day and analyze patterns in my movement. By allowing QField to continuously track and save my location, even in the background or after a restart, this would make QField + QGIS highly flexible for long-term data collection and analysis.

Proposed feature:

Add an optional setting to enable background GPS tracking with saving directly to a layer.

Ensure this setting is disabled by default for privacy reasons.

Maintain location tracking after:

Ensure the feature is optional and can be toggled on or off by users as needed.

Provide uninterrupted data logging without requiring manual intervention after restarts.

This enhancement would significantly improve the utility of location tracking for users needing seamless, continuous data collection.

Plattform Android

werererer commented 1 week ago

Screenshot_20241017_101314.jpg

This Feature I am talking about

Ipickedausername commented 1 week ago

Hi,

I’m wondering if implementing a system to automatically start an app after a phone restart would be feasible or even practical. How would the app know when to launch, automatically activate the GPS, select the correct project (especially if multiple projects exist), and fill in the necessary fields? There could also be numerous potential challenges, such as how to handle field constraints if tracking is automatically initiated.

QField already offers an option to start tracking when a project is opened. You can have fields auto-complete and simply validate the new feature to begin tracking. It requires a few steps, but the process is fairly quick—I use it myself.

I’m not sure if the app stops tracking when running in the background, though. That would indeed be an issue.

werererer commented 1 week ago

Screenshot_20241017_111558_Permission controller.jpg

Screenshot_20241017_111636_Permission controller.jpg

comparing this app with another, qfield doesnt have an option to track in the background

werererer commented 1 week ago

About the other problems, about how the layer can be known: Limit the auto tracking to one Project(the Last opened). Also, on starting tracking, the layer is know, and whether constraints are fullfilled. (could add a toggle box, persist Tracking e.g.)