With this app, you can measure your total distance traveled within the office or your home. It's a simple app with the following structure.
- 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/index - 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
$ expo start
with ❤️ byCedric
"Sign out" button
Solid tutorial here.
TODO:
- Make the location tracking happen at a specific time
- Get the locations showing up on screen (may not be necessary, but i want to do it so that I can watch on my phone)
- Make "go to settings" button if they don't have location settings set up
Assigning date:
- they are assigned a random date within the date range specified
- When the time is 03:00:00 (in time zone of the survey area) on that date, start location tracking
- When the time is 02:59:59 on the next day, stop location tracking