beeware / beeware/toga

Balanced mode for background GPS location

Open
#3,085 16 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
5.4k
Forks
827
Avg merge
15h 39m
Merged PRs (30d)
40

Description

### What is the problem or limitation you are having?

Currently we are only supporting continuous retrieval of the GPS coordinates, draining the battery.

When we look into a tool like owntracks we see that also a more balanced mode for different platforms is available. I would be nice to implement these into our hardware platform

### Describe the solution you'd like

Add a startMonitoring SignificantLocationChange and stopMonitoringSignificantLocationChanges function to toga hardware to the location function.

for ios/macos we have the following:
Apple defines a Significant location change as traveling a distance of at least 500 meters in 5 minutes. This mode allows the app to run in background and minimize the power consumption.

This standard tracking mode reports significant location changes only (>500m and at most once every 5 minutes). This is defined by Apple and is optimal with respect to battery usage.

This can be started with the following API call startMonitoringSignificantLocationChanges and stopping with stopMonitoringSignificantLocationChanges

Examples:

if you don't move, no new location is published - even if you don't move for hours. (Note, however, that the app will publish a ping-type message once in a while.)
if you move at least 500 meters, a new location will be published after 5 minutes
if you move 10 kilometers in 5 minutes, only one location will be published

To get a consistent result on android we can use the following:
locatorDisplacement : 500m
locatorInterval : 300 seconds
LocatorPriority : BalancedPowerAccurancy

### Describe alternatives you've considered

Using an additional application solely for GPS data (owntracks0

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating Toga's location API and its iOS, macOS, and Android implementations, then compare the existing continuous tracking behavior with the platform APIs named in the issue. Done means exposing startMonitoringSignificantLocationChange and stopMonitoringSignificantLocationChanges and applying the stated 500-meter, 300-second balanced-power behavior consistently across the platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, ios, macos, python
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.