This demo app is a simple example of how to use background location tracking on Android. With this app, you can measure your total distance traveled within the office or your home.
app
- is our entrypoint for the app, combining all providers.
providers/asset
- loads the custom font, using Expo Google Fonts.providers/navigation
- sets up our app screens and navigational strucutre, using React Navigation.providers/theme
- handles some slightly styled components for us, using Dripsy.
screens/onboarding
- this is where the app asks the user for background location permissions.screens/distance
- after the permissions are granted, the user can start/stop/reset location tracking and see their distance.
services/location
- calculates distance between points and wraps the functionality in hooks for easy access.services/location/storage
- simple helpers to store location data in local storage, using Async Storage.services/location/track
- simple helpers to manage background location tracking, and the background task itself.
- Clone the repository
$ yarn install
$ yarn expo start
with :heart: byCedric