bus booking system mobile application build on react native which helps user to select their pickup time and date with their location along with drop off time and date with their location.
Let’s take a case of bus booking system.
- User's input following things:
- Pickup date and time
- Pickup point using google map
- Return date and time
- Return drop point using google map
- Application rules
- Pickup Date Time should be at least 3 hours from current time and should not be more than 8 hours from current time. Eg if current date time is 2017 Jan 18 10:00 am, user cannot choose pickup date as 2017 Jan 18 12:59 pm (because it’s less than 3 hours from current date time) but he can choose pickup date as 2017 Jan 18 1:00 pm (because its at least 3 hours from current date time). User can choose pickup date as 2017 Jan 18 6:00 pm (because it’s not more than 8 hours from current time) but user cannot choose pickup date as 2017 Jan 18 6:01 pm (because it’s more than 8 hours from current time )
- clone this react project by running below command in git terminal: git clone https://github.com/iambinodstha/bus-booking.git
- after Step 1. goto project directory: cd bus-booking
- install dependencies: npm install or yarn install
- add your google map api key
you need to add your GOOGLE_API_KEY on
android/app/src/main/AndroidManifest.xml
file and remove YOUR_GOOGLE_MAPS_API_KEY_HERE with your actual api key
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_GOOGLE_MAPS_API_KEY_HERE"/>
you can get your api key from Google Maps Platform
npx react-native run-android
orreact-native run-android
- pod install
cd ios && pod install
- add api key on
ios/projectname/AppDelegate.m
[GMSServices provideAPIKey:@"YOUR_GOOGLE_MAPS_API_KEY_HERE"]; // get your API_KEY from google cloud console
- build
npx react-native run-ios
orreact-native run-ios