Skip to content

Location Tracking

Martha Sharpe edited this page Jan 13, 2021 · 6 revisions

Background location tracking is handled on the DashboardScreen.

If permissions are granted by the user and the driver is logged in and on-call, updates are sent to the api every 400 meters or .25 miles.

When in the foreground, a bar is displayed on the top of the device indicating that the app is actively tracking the driver's location.

Because it drains battery life in the foreground, the app will become backgrounded after a few minutes of disuse. When the app becomes backgrounded, location updates are batched every 5 minutes.

Because it is a background task, the function that sets the location is defined in the TaskManager, called in the global scope of the app.

Clone this wiki locally