This is a react native project that uses GPS to track your location and adds markers for the distance you have traveled. It also tells you your approximate speed and total distance traveled.
Acknowledgement to son-bui developer from youtube for teaching how to code this react native application. For further details, you can visit this youtube link
This readme will provide the basics on how to deploy the application on your phone. I will not go through the code as you can watch the youtube for that. I am working on Android, but I think for iOS you have to change something on the maps issue.
1. React Native Application Init
2. Installing of Maps
3. Install Haversine
4. Ready-to-go
I assume you have installed React Native on your working device, otherwise, please follow this documentation I am working on Native code, so we will not require expo
- Go to your working folder directory, and react-native init [Project Name]; there might be some issues with the current version, otherwise use this react-native init [projectName] --version [email protected] --verbose. Click here for more info.
We will be using the react-native-maps that has been created by Airbnb as the Maps that react native had has been degraded. Follow this link to install, link and change some files for the maps to work
Installation of Haversine is required for this application as it will help us do the distance calculation.
npm haversine For more Info
If you are using Android, please EDIT the Google API section in the Manifest.xml file i have added to this repo
You should be able to run react-native run-android to run this application on your phone thereafter
- Copy files to a new folder named React_Project
- Enter command prompt as ADMINISTRATOR
- paste this code to install react native onto your operating system ->> npm install -g create-react-native-app
- Follow this documentation under the link [BUILDING PROJECTS UNDER NATIVE CODE]
cd to project folder where your files are (android, ios, node_modules, etc... files)
try to run
1) *react-native run-android [ANDROID]*
2) *react-native run-ios [ios]*
cd to project folder Follow Part A Step 1 to Step 4 above. Step 2 can be skipped for this project. Copy files attached to this github to your project.
cd to project folder Follow part A Step 1 to Step 4 exactly
Run
- react-native run-android [ANDROID]
- react-native run-ios [ios]
This build was built on Android. Maps might not function correctly for iOS due to certain dependencies. Please check again on iOS map dependencies** For full React Native Tutorial please visit this youtube link